File tree Expand file tree Collapse file tree 1 file changed +0
-34
lines changed Expand file tree Collapse file tree 1 file changed +0
-34
lines changed Original file line number Diff line number Diff line change @@ -1972,40 +1972,6 @@ def self.test_prism_call_node
1972
1972
end
1973
1973
test_prism_call_node
1974
1974
CODE
1975
-
1976
- # Test opt_str_freeze instruction when calling #freeze on a string literal
1977
- assert_prism_eval ( <<~RUBY )
1978
- "foo".freeze.equal?("foo".freeze)
1979
- RUBY
1980
- # Test encoding in opt_str_freeze
1981
- assert_prism_eval ( <<~'RUBY' , raw : true )
1982
- # -*- coding: us-ascii -*-
1983
- "\xff".freeze.encoding
1984
- RUBY
1985
-
1986
- # Test opt_aref_with instruction when calling [] with a string
1987
- assert_prism_eval ( <<~RUBY )
1988
- ObjectSpace.count_objects
1989
-
1990
- h = {"abc" => 1}
1991
- before = ObjectSpace.count_objects[:T_STRING]
1992
- 5.times{ h["abc"] }
1993
- after = ObjectSpace.count_objects[:T_STRING]
1994
-
1995
- before == after
1996
- RUBY
1997
-
1998
- # Test opt_aset_with instruction when calling []= with a string key
1999
- assert_prism_eval ( <<~RUBY )
2000
- ObjectSpace.count_objects
2001
-
2002
- h = {"abc" => 1}
2003
- before = ObjectSpace.count_objects[:T_STRING]
2004
- 5.times{ h["abc"] = 2}
2005
- after = ObjectSpace.count_objects[:T_STRING]
2006
-
2007
- before == after
2008
- RUBY
2009
1975
end
2010
1976
2011
1977
def test_CallAndWriteNode
You can’t perform that action at this time.
0 commit comments