summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-09-13 09:14:20 -0400
committergit <svn-admin@ruby-lang.org>2023-09-13 13:40:46 +0000
commitf9898b9ecab9851f32e1b3aad1176c801150f975 (patch)
tree47b955ac228ee28c135f775ce6f66ff6c5b8c0b9 /test
parentea75a682a9adfac1723308a1c032b7d9b68ffcb6 (diff)
[ruby/yarp] Better handle invalid gvar writes
https://github.com/ruby/yarp/commit/eaaebc17c8
Diffstat (limited to 'test')
-rw-r--r--test/yarp/errors_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/yarp/errors_test.rb b/test/yarp/errors_test.rb
index e81a4cfac6..2a032e4f84 100644
--- a/test/yarp/errors_test.rb
+++ b/test/yarp/errors_test.rb
@@ -1143,6 +1143,12 @@ module YARP
]
end
+ def test_invalid_global_variable_write
+ assert_errors expression("$',"), "$',", [
+ ["Immutable variable as a write target", 0..2]
+ ]
+ end
+
private
def assert_errors(expected, source, errors)