mirror of
https://github.com/ruby/ruby.git
synced 2025-09-20 19:14:00 +02:00
parent
907aa47527
commit
e83c02a768
Notes:
git
2021-11-06 00:22:41 +09:00
2 changed files with 6 additions and 1 deletions
|
@ -134,6 +134,11 @@ class TestEnumerable < Test::Unit::TestCase
|
|||
assert_equal([1, 2, 3, 1, 2], @obj.to_a)
|
||||
end
|
||||
|
||||
def test_to_a_keywords
|
||||
def @obj.each(foo:) yield foo end
|
||||
assert_equal([1], @obj.to_a(foo: 1))
|
||||
end
|
||||
|
||||
def test_to_a_size_symbol
|
||||
sym = Object.new
|
||||
class << sym
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue