summaryrefslogtreecommitdiff
path: root/test/ostruct
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-12 07:34:42 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-12 07:34:42 +0000
commitc9f62d7f5beb4d1c688c7a9da0961e9c78ccca56 (patch)
treecda616558f18c26e4a4a558273ddc6f7312c9767 /test/ostruct
parentaeddf6677a91a267a8fd73ad00b36ad442623fa7 (diff)
merge revision(s) 57515: [Backport #13169]
lib/ostruct.rb: Fix returned value of each_pair. From a patch by Marcus Stollsteimer. [Fixes #13169] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@57893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ostruct')
-rw-r--r--test/ostruct/test_ostruct.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ostruct/test_ostruct.rb b/test/ostruct/test_ostruct.rb
index aeccc9209a..7df5200ca1 100644
--- a/test/ostruct/test_ostruct.rb
+++ b/test/ostruct/test_ostruct.rb
@@ -141,6 +141,7 @@ class TC_OpenStruct < Test::Unit::TestCase
def test_each_pair
h = {name: "John Smith", age: 70, pension: 300}
os = OpenStruct.new(h)
+ assert_same os, os.each_pair{ }
assert_equal '#<Enumerator: #<OpenStruct name="John Smith", age=70, pension=300>:each_pair>', os.each_pair.inspect
assert_equal [[:name, "John Smith"], [:age, 70], [:pension, 300]], os.each_pair.to_a
assert_equal 3, os.each_pair.size