diff options
author | Benoit Daloze <eregontp@gmail.com> | 2019-10-26 20:53:01 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-10-26 20:53:01 +0200 |
commit | 664e96b1de816c813c29f61e16a2031a7af7ba86 (patch) | |
tree | 7f4691847cd6b3282812eea7e2be3758e08d1433 /spec/ruby/core/regexp | |
parent | 3eb0d50c0baae916f4486c264605b18e77bee0dc (diff) |
Update to ruby/spec@28a728b
Diffstat (limited to 'spec/ruby/core/regexp')
-rw-r--r-- | spec/ruby/core/regexp/encoding_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/core/regexp/encoding_spec.rb b/spec/ruby/core/regexp/encoding_spec.rb index 6ce6f8b3ca..dfc835b4e4 100644 --- a/spec/ruby/core/regexp/encoding_spec.rb +++ b/spec/ruby/core/regexp/encoding_spec.rb @@ -55,4 +55,8 @@ describe "Regexp#encoding" do /foo/.encoding.should_not == Encoding::EUC_JP Encoding.default_internal = old_internal end + + it "allows otherwise invalid characters if NOENCODING is specified" do + Regexp.new('([\x00-\xFF])', Regexp::IGNORECASE | Regexp::NOENCODING).encoding.should == Encoding::BINARY + end end |