diff options
author | Yuki Yugui Sonoda <yugui@yugui.jp> | 2019-06-16 22:28:34 +0900 |
---|---|---|
committer | Yuki Yugui Sonoda <yugui@yugui.jp> | 2019-06-16 22:43:03 +0900 |
commit | 44caca11cfa6bea01a1ef738846183f1a56d5658 (patch) | |
tree | 65538995ed3d9e6ef425b0c11c604bca1eebe991 /test | |
parent | 2fb1564c02899c73519164ddf3f2430dfbc8f3d6 (diff) |
Make constant assignments more conforming to JIS X 3017:2013 11.4.2.2.3
compile.c (NODE_CDECL): Evaluate the module before the value
test/ruby/test_const.rb (test_evaluation_order): added a test case
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_const.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_const.rb b/test/ruby/test_const.rb index 8784e0e988..fa512aa437 100644 --- a/test/ruby/test_const.rb +++ b/test/ruby/test_const.rb @@ -69,4 +69,12 @@ PRE def test_toplevel_lookup assert_raise(NameError, '[Feature #11547]') {TestConst::Object} end + + def test_evaluation_order + assert_raise_with_message(RuntimeError, "recv", 'JIS X 3017:2013 11.4.2.2.3') { + eval <<~EOS + raise('recv')::C = raise('value') + EOS + } + end end |