summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-struct/test/struct.rb
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2016-07-25 14:19:10 +0900
committerGitHub <[email protected]>2016-07-25 14:19:10 +0900
commita66a1e92e79c25b14beb8a950ae96a7189b9a38d (patch)
treec86aafc625aac1e4b8580f3b60e4b845cb7f9d28 /mrbgems/mruby-struct/test/struct.rb
parent34ac707ea34880e168dc2428d477a33ca7ffec7d (diff)
parentbf21063a7245f5d8ae0773cf88422bece9d0e784 (diff)
downloadmruby-a66a1e92e79c25b14beb8a950ae96a7189b9a38d.tar.gz
mruby-a66a1e92e79c25b14beb8a950ae96a7189b9a38d.zip
Merge pull request #3179 from ksss/struct
Should not define to `Struct` class
Diffstat (limited to 'mrbgems/mruby-struct/test/struct.rb')
-rw-r--r--mrbgems/mruby-struct/test/struct.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/mrbgems/mruby-struct/test/struct.rb b/mrbgems/mruby-struct/test/struct.rb
index 63a02817e..02ecf69e4 100644
--- a/mrbgems/mruby-struct/test/struct.rb
+++ b/mrbgems/mruby-struct/test/struct.rb
@@ -23,6 +23,9 @@ assert('Struct#==', '15.2.18.4.1') do
cc1 = c.new(1,2)
cc2 = c.new(1,2)
assert_true cc1 == cc2
+
+ Struct.new(:m1, :m2) { def foo; end }
+ assert_raise(NoMethodError) { Struct.new(:m1).new.foo }
end
assert('Struct#[]', '15.2.18.4.2') do