Commit a1003525 authored by skandhas's avatar skandhas

add test for 'Abbreviated variable assignment as returns'

parent 9704ceef
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment