From: naruse@... Date: 2015-02-24T07:37:00+00:00 Subject: [ruby-core:68277] [Ruby trunk - Bug #10886] String#split now throws a RegexpError instead of an ArgumentError Issue #10886 has been updated by Yui NARUSE. Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: DONE ruby_2_2 r49717 merged revision(s) 49695. ---------------------------------------- Bug #10886: String#split now throws a RegexpError instead of an ArgumentError https://bugs.ruby-lang.org/issues/10886#change-51635 * Author: Benoit Daloze * Status: Closed * Priority: Normal * Assignee: * ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: DONE ---------------------------------------- ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux] -e:1:in `split': invalid byte sequence in UTF-8 (ArgumentError) from -e:1:in `
' ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux] -e:1:in `split': invalid multibyte character: /\xFF/ (RegexpError) from -e:1:in `
' This is leaking implementation details and so I think is a bug as such. The bug was discovered thanks to https://github.com/rubyspec/rubyspec/blob/archive/core/string/split_spec.rb#L16-L23. -- https://bugs.ruby-lang.org/