diff options
Diffstat (limited to 'test/yarp/compiler_test.rb')
-rw-r--r-- | test/yarp/compiler_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/yarp/compiler_test.rb b/test/yarp/compiler_test.rb index bb1a1f47e8..668908d423 100644 --- a/test/yarp/compiler_test.rb +++ b/test/yarp/compiler_test.rb @@ -69,6 +69,10 @@ module YARP assert_equal 1, compile("class YARP::CompilerTest; @yct = 1; @yct; end") end + def test_LocalVariableReadNode + assert_equal 1, compile("yct = 1; yct") + end + ############################################################################ # Writes # ############################################################################ @@ -93,6 +97,10 @@ module YARP assert_equal 1, compile("class YARP::CompilerTest; @yct = 1; end") end + def test_LocalVariableWriteNode + assert_equal 1, compile("yct = 1") + end + ############################################################################ # String-likes # ############################################################################ |