summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-11 00:05:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-11 00:05:12 +0000
commit5fade63482d39d9c550a0ce8a555dc8e3c0aedec (patch)
tree5d99adf08d3c5e7503b353229fe71c2ba633eb0f /test
parent724878c9139715fea803690cfd2a0687abbd7242 (diff)
re.c: fixed escaped multibyte char
* re.c (unescape_nonascii): escaped multibyte character should be copied as-is, just with checking if the encoding matches. https://twitter.com/sakuro/status/972014409986883584 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_regexp.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index 85d5b2cdfe..90892355e5 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -515,6 +515,8 @@ class TestRegexp < Test::Unit::TestCase
s = ".........."
5.times { s.sub!(".", "") }
assert_equal(".....", s)
+
+ assert_equal("\\\u{3042}", Regexp.new("\\\u{3042}").source)
end
def test_equal