summaryrefslogtreecommitdiffhomepage
path: root/test/t/syntax.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/t/syntax.rb')
-rw-r--r--test/t/syntax.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/t/syntax.rb b/test/t/syntax.rb
index 47221d425..0501608e5 100644
--- a/test/t/syntax.rb
+++ b/test/t/syntax.rb
@@ -58,3 +58,14 @@ assert('Nested const reference') do
Syntax4Const::CONST1 == "hello world" and
Syntax4Const::Const2.new.const1 == "hello world"
end
+
+assert('Abbreviated variable assignment as returns') do
+ module Syntax4AbbrVarAsgnAsReturns
+ class A
+ def b
+ @c ||= 1
+ end
+ end
+ end
+ Syntax4AbbrVarAsgnAsReturns::A.new.b == 1
+end