summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-03-13 15:17:26 +0900
committerNobuyoshi Nakada <[email protected]>2025-03-20 17:32:26 +0900
commit820c541671d9485144d81138bb029f2da8379edd (patch)
treea3492de1c0e007cda2bf380991cceea5d49df01b /test/ruby
parent641f15b1c6bd8921407a1f045573d3b0605f00d3 (diff)
[Bug #21026] no singleton method on pseudo variable literal
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12925
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_parse.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index 0c50793549..98e95b98af 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -475,6 +475,12 @@ class TestParse < Test::Unit::TestCase
assert_parse_error(%q[def (:"#{42}").foo; end], msg)
assert_parse_error(%q[def ([]).foo; end], msg)
assert_parse_error(%q[def ([1]).foo; end], msg)
+ assert_parse_error(%q[def (__FILE__).foo; end], msg)
+ assert_parse_error(%q[def (__LINE__).foo; end], msg)
+ assert_parse_error(%q[def (__ENCODING__).foo; end], msg)
+ assert_parse_error(%q[def __FILE__.foo; end], msg)
+ assert_parse_error(%q[def __LINE__.foo; end], msg)
+ assert_parse_error(%q[def __ENCODING__.foo; end], msg)
end
def test_flip_flop