aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Hess <HParker@github.com>2021-01-05 15:34:45 -0800
committerGitHub <noreply@github.com>2021-01-05 18:34:45 -0500
commite13f41e02df0d29fbde659b9e426862a8d433003 (patch)
tree80768b1f6506a43a481db743f68d3b2d0080141c /lib
parent3108ad7bf3dcae52054a1c29b86246cdb470000b (diff)
downloadruby-e13f41e02df0d29fbde659b9e426862a8d433003.tar.gz
[ruby/ostruct] Allow ostruct to return a value on super (#4028)
This fixes cases where you can super in something that inherits from OpenStruct Co-authored-by: John Hawthorn <john@hawthorn.email>
Diffstat (limited to 'lib')
-rw-r--r--lib/ostruct.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ostruct.rb b/lib/ostruct.rb
index a5a5140d10..e7beac044f 100644
--- a/lib/ostruct.rb
+++ b/lib/ostruct.rb
@@ -240,6 +240,7 @@ class OpenStruct
end
set_ostruct_member_value!(mname, args[0])
elsif len == 0
+ @table[mid]
else
begin
super