summaryrefslogtreecommitdiff
path: root/kernel.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2024-01-23 11:36:23 -0800
committer<[email protected]>2024-01-23 19:36:23 +0000
commit27c1dd8634d34bfe3592151d66b410f28ca749ce ()
treeaccb9d7f9f44ec2ed2bc791c6bc928b0dd062d28 /kernel.rb
parent557b69e83b27dafea435719fc3afc2e67e155962 (diff)
YJIT: Allow inlining ISEQ calls with a block (#9622)
* YJIT: Allow inlining ISEQ calls with a block * Leave a TODO comment about u16 inline_block
-rw-r--r--kernel.rb4
1 files changed, 4 insertions, 0 deletions
@@ -87,6 +87,7 @@ module Kernel
#++
#
def tap
yield(self)
self
end
@@ -127,6 +128,7 @@ module Kernel
# then {|response| JSON.parse(response) }
#
def then
unless block_given?
return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, rb_obj_size)'
end
@@ -142,6 +144,7 @@ module Kernel
# "my string".yield_self {|s| s.upcase } #=> "MY STRING"
#
def yield_self
unless block_given?
return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, rb_obj_size)'
end
@@ -178,6 +181,7 @@ module Kernel
# puts enum.next
# } #=> :ok
def loop
unless block_given?
return enum_for(:loop) { Float::INFINITY }
end