1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/-ext-/test_enumerator_kw.rb

12 lines
322 B
Ruby
Raw Normal View History

require 'test/unit'
require '-test-/enumerator_kw'
class TestEnumeratorKw < Test::Unit::TestCase
def test_enumerator_kw
o = Object.new
o.extend Bug::EnumeratorKw
assert_equal([nil, [], {:a=>1}, o], o.m(a: 1) { |*a| a })
assert_equal([nil, [[], {:a=>1}, o], nil, o], o.m(a: 1).each { |*a| a })
end
end