mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00
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
This commit is contained in:
parent
724878c913
commit
5fade63482
2 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue