aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ostruct.rb
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-03 18:25:28 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-03 18:25:28 +0000
commit10d92ffcd55b230b02800abf45cf9aa403ab5262 (patch)
tree492fdb2e83d6db0d64a12c791b2aa2ca22dc2a59 /lib/ostruct.rb
parent5cfe3b29182d22d05fdf3684d3b6f2f1429a9eab (diff)
downloadruby-10d92ffcd55b230b02800abf45cf9aa403ab5262.tar.gz
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
Diffstat (limited to 'lib/ostruct.rb')
-rw-r--r--lib/ostruct.rb1
1 files changed, 1 insertions, 0 deletions
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
#