From: David Alan Black Date: 2002-07-04T05:12:34+09:00 Subject: Re: String#split with nil first argument Hello -- On Thu, 4 Jul 2002, George Ogata wrote: > When calling String#split with no arguments, it defaults to using $;, ...only if $; is non-nil (because you can't split on nil) > which, by default, is set to nil. However, when calling String#split > with nil (including $; when it is set to nil) it raises exception. > This surprised me, which opposes the Principle of Least Surprise. > > Oughtn't String#split use $; when called with a nil first argument? Can't you just not provide an argument? And if you want to use $;, you can just assign to $; (and not provide an argument). David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav