summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ostruct.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ostruct.rb b/lib/ostruct.rb
index 0e13f406922..84244b3d9ee 100644
--- a/lib/ostruct.rb
+++ b/lib/ostruct.rb
@@ -227,7 +227,7 @@ class OpenStruct
begin
name = name.to_sym
rescue NoMethodError
- return
+ raise TypeError, "#{name} is not a symbol nor a string"
end
@table.dig(name, *names)
end