summaryrefslogtreecommitdiff
path: root/test/ripper/test_ripper.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-24 13:19:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-24 13:19:57 +0000
commit0331e42be396bfb85f4f36009629f4199d074300 (patch)
treeddb5b09a4dd17cf120f16f6281e27456f68ee469 /test/ripper/test_ripper.rb
parent87108634e10364103928cb96df95fa6b1c6f951d (diff)
parse.y: freeze filename
* parse.y (ripper_initialize): filename can not be modified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper/test_ripper.rb')
-rw-r--r--test/ripper/test_ripper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ripper/test_ripper.rb b/test/ripper/test_ripper.rb
index 1d6e893..b582de5 100644
--- a/test/ripper/test_ripper.rb
+++ b/test/ripper/test_ripper.rb
@@ -26,6 +26,10 @@ class TestRipper::Ripper < Test::Unit::TestCase
def test_filename
assert_equal '(ripper)', @ripper.filename
+ filename = "ripper"
+ ripper = Ripper.new("", filename)
+ filename.clear
+ assert_equal "ripper", ripper.filename
end
def test_lineno