mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
[ruby/optparse] The encoding argument of Regexp.new
has been ignored since 1.9
766f567405
This commit is contained in:
parent
afd46429fc
commit
502ca37dde
2 changed files with 19 additions and 3 deletions
|
@ -63,6 +63,9 @@ class TestOptionParser < Test::Unit::TestCase
|
|||
assert_equal(/foo/i, @reopt)
|
||||
assert_equal(%w"", no_error {@opt.parse!(%w"--regexp=/foo/n")})
|
||||
assert_equal(/foo/n, @reopt)
|
||||
assert_equal(%w"", no_error {@opt.parse!(%W"--regexp=/\u{3042}/s")})
|
||||
assert_equal(Encoding::Windows_31J, @reopt.encoding)
|
||||
assert_equal("\x82\xa0".force_encoding(Encoding::Windows_31J), @reopt.source)
|
||||
end
|
||||
|
||||
def test_into
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue