ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:48650] [ruby-trunk - Bug #10393] [Open] String#start_with?の1.9.x非互換バグ
       [not found] <redmine.issue-10393.20141016101219@ruby-lang.org>
@ 2014-10-16 10:12 ` choripon
  2014-10-17  1:03 ` [ruby-dev:48655] [ruby-trunk - Bug #10393] [Rejected] String#start_with?の1.9.x非互換バグ matz
  1 sibling, 0 replies; 2+ messages in thread
From: choripon @ 2014-10-16 10:12 UTC (permalink / raw
  To: ruby-dev

Issue #10393 has been reported by Hideyuki Matsuyama.

----------------------------------------
Bug #10393: String#start_with?の1.9.x非互換バグ
https://bugs.ruby-lang.org/issues/10393

* Author: Hideyuki Matsuyama
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
~~~
$ ruby -v
ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-darwin13.4.0]
$ irb
> 'foo'.start_with? nil
 => false 
~~~
~~~
$ ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]
$ irb
> 'foo'.start_with? nil
TypeError: no implicit conversion of nil into String
~~~

バージョン1.9系との互換性を保つため、結果がfalseになることを期待します。



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ruby-dev:48655] [ruby-trunk - Bug #10393] [Rejected] String#start_with?の1.9.x非互換バグ
       [not found] <redmine.issue-10393.20141016101219@ruby-lang.org>
  2014-10-16 10:12 ` [ruby-dev:48650] [ruby-trunk - Bug #10393] [Open] String#start_with?の1.9.x非互換バグ choripon
@ 2014-10-17  1:03 ` matz
  1 sibling, 0 replies; 2+ messages in thread
From: matz @ 2014-10-17  1:03 UTC (permalink / raw
  To: ruby-dev

Issue #10393 has been updated by Yukihiro Matsumoto.

Status changed from Open to Rejected

start_with? に nil が渡されるのはバグの可能性が高く、それが検出できないのは問題の発覚を引き延ばしているだけのように思います。2.0とメジャーバージョンアップがあったので、バグの発見を遅らせる軽微な互換性は維持する必要はないのではないでしょうか。

これが私(たち)の見落としで、正当にnilをfalseとすべき理由が(互換性以外に)あるのでしたら、reopenしてください。

まつもと ゆきひろ /:|)


----------------------------------------
Bug #10393: String#start_with?の1.9.x非互換バグ
https://bugs.ruby-lang.org/issues/10393#change-49504

* Author: Hideyuki Matsuyama
* Status: Rejected
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
~~~
$ ruby -v
ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-darwin13.4.0]
$ irb
> 'foo'.start_with? nil
 => false 
~~~
~~~
$ ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]
$ irb
> 'foo'.start_with? nil
TypeError: no implicit conversion of nil into String
~~~

バージョン1.9系との互換性を保つため、結果がfalseになることを期待します。



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-17  1:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-10393.20141016101219@ruby-lang.org>
2014-10-16 10:12 ` [ruby-dev:48650] [ruby-trunk - Bug #10393] [Open] String#start_with?の1.9.x非互換バグ choripon
2014-10-17  1:03 ` [ruby-dev:48655] [ruby-trunk - Bug #10393] [Rejected] String#start_with?の1.9.x非互換バグ matz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).