mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Remove redundant :use_block with yield (#11203)
This commit is contained in:
parent
8cf708d7b4
commit
174c01b80e
Notes:
git
2024-07-20 01:36:33 +00:00
Merged-By: k0kubun <takashikkbn@gmail.com>
1 changed files with 0 additions and 3 deletions
3
array.rb
3
array.rb
|
@ -43,7 +43,6 @@ class Array
|
||||||
# Related: #each_index, #reverse_each.
|
# Related: #each_index, #reverse_each.
|
||||||
def each
|
def each
|
||||||
Primitive.attr! :inline_block
|
Primitive.attr! :inline_block
|
||||||
Primitive.attr! :use_block
|
|
||||||
|
|
||||||
unless defined?(yield)
|
unless defined?(yield)
|
||||||
return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, ary_enum_length)'
|
return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, ary_enum_length)'
|
||||||
|
@ -73,7 +72,6 @@ class Array
|
||||||
# a1 # => #<Enumerator: [:foo, "bar", 2]:map>
|
# a1 # => #<Enumerator: [:foo, "bar", 2]:map>
|
||||||
def map
|
def map
|
||||||
Primitive.attr! :inline_block
|
Primitive.attr! :inline_block
|
||||||
Primitive.attr! :use_block
|
|
||||||
|
|
||||||
unless defined?(yield)
|
unless defined?(yield)
|
||||||
return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, ary_enum_length)'
|
return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, ary_enum_length)'
|
||||||
|
@ -108,7 +106,6 @@ class Array
|
||||||
# a.select # => #<Enumerator: [:foo, "bar", 2, :bam]:select>
|
# a.select # => #<Enumerator: [:foo, "bar", 2, :bam]:select>
|
||||||
def select
|
def select
|
||||||
Primitive.attr! :inline_block
|
Primitive.attr! :inline_block
|
||||||
Primitive.attr! :use_block
|
|
||||||
|
|
||||||
unless defined?(yield)
|
unless defined?(yield)
|
||||||
return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, ary_enum_length)'
|
return Primitive.cexpr! 'SIZED_ENUMERATOR(self, 0, 0, ary_enum_length)'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue