From: spiketeika@... Date: 2015-11-23T11:17:30+00:00 Subject: [ruby-dev:49380] [Ruby trunk - Bug #11729] String#split(nil) incorrectly uses $; Issue #11729 has been updated by Kaneko Yuichiro. I think this is intended. [Comment of MRI](https://github.com/ruby/ruby/blob/6965964df65c1c3679b92b92101225e4a709ba73/string.c#L6583) and [rubyspec](https://github.com/ruby/rubyspec/blob/d439436f9c73e491e6b137eb41bcd1e9b9de9b4c/core/string/split_spec.rb#L74). ---------------------------------------- Bug #11729: String#split(nil) incorrectly uses $; https://bugs.ruby-lang.org/issues/11729#change-55040 * Author: Tatsuya Otsuka * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0dev (2015-11-21 trunk 52698) [x86_64-darwin14] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- Hi, Is this intentional? ``` $; = "@" "a@b".split(nil) # => ["a", "b"] ``` I expect `["a@b"]` because I found the following sentence in the Japanese documentation. ``` 1 バイトの空白文字 ' ' か nil 先頭と末尾の空白を除いたうえで、空白文字列で分割する。 ``` http://docs.ruby-lang.org/ja/2.2.0/method/String/i/split.html -- https://bugs.ruby-lang.org/