From 4d7b999c77f7869df3a07abc263838eee3e8dd60 Mon Sep 17 00:00:00 2001 From: marcandre Date: Fri, 3 Feb 2017 18:25:28 +0000 Subject: 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/trunk@57515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/ostruct.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/ostruct.rb b/lib/ostruct.rb index bbf1743247..417ecf62b3 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -130,6 +130,7 @@ class OpenStruct def each_pair return to_enum(__method__) { @table.size } unless block_given? @table.each_pair{|p| yield p} + self end # -- cgit v1.2.3