diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-11-02 08:02:21 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-11-02 08:02:21 +0900 |
| commit | 308b41c12b3095a5dec85ca89d32a5b196434141 (patch) | |
| tree | 389838ff3cd6dd0d30287daf7049f1ac2c793398 | |
| parent | 3b86394afc66385a69e28313b60cf505dc37c621 (diff) | |
| download | mruby-308b41c12b3095a5dec85ca89d32a5b196434141.tar.gz mruby-308b41c12b3095a5dec85ca89d32a5b196434141.zip | |
add test for 8cf42709
| -rw-r--r-- | test/t/syntax.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/t/syntax.rb b/test/t/syntax.rb index 7898a0b7d..47221d425 100644 --- a/test/t/syntax.rb +++ b/test/t/syntax.rb @@ -45,3 +45,16 @@ assert('Abbreviated variable assignment', '11.4.2.3.2') do c += 2 a == 1 and b == nil and c == 3 end + +assert('Nested const reference') do + module Syntax4Const + CONST1 = "hello world" + class Const2 + def const1 + CONST1 + end + end + end + Syntax4Const::CONST1 == "hello world" and + Syntax4Const::Const2.new.const1 == "hello world" +end |
