summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2019-11-27 11:40:18 +0000
committerYusuke Endoh <[email protected]>2020-01-15 10:38:47 +0900
commit98ef38ada43338c073f50a0093196f0356284625 ()
tree1e7bdf0b54f4745501b9f3aed8ac44132ab6d25b /test/ruby/test_regexp.rb
parent07aef4c99ac4be3073f8b15ebdfa324a7f94f5e3 (diff)
Freeze Regexp literals
[Feature #8948] [Feature #16377] Since Regexp literals always reference the same instance, allowing to mutate them can lead to state .
Notes: Merged: https://.com/ruby/ruby/pull/2705
-rw-r--r--test/ruby/test_regexp.rb2
1 files changed, 1 insertions, 1 deletions
@@ -622,7 +622,7 @@ class TestRegexp < Test::Unit::TestCase
def test_dup
assert_equal(//, //.dup)
- assert_raise(TypeError) { //.instance_eval { initialize_copy(nil) } }
end
def test_regsub