Forum: Ruby-core [ruby-trunk - Bug #6685][Open] duplicate results in Dir[]

Posted by john_firebaugh (John Firebaugh) (Guest)
on 2012-07-02 04:08
(Received via mailing list)
Issue #6685 has been reported by john_firebaugh (John Firebaugh).

----------------------------------------
Bug #6685: duplicate results in Dir[]
https://bugs.ruby-lang.org/issues/6685

Author: john_firebaugh (John Firebaugh)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) 
[x86_64-darwin11.3.0]


$ mkdir a
$ touch a/b.rb
$ irb
>> Dir['a{,/**}/*.rb']
=> ["a/b.rb", "a/b.rb"]

I expected ["a/b.rb"].
Posted by john_firebaugh (John Firebaugh) (Guest)
on 2012-07-02 04:20
(Received via mailing list)
Issue #6685 has been updated by john_firebaugh (John Firebaugh).


Hmm, according to http://www.ruby-forum.com/topic/153846 this is 
intended behavior.
----------------------------------------
Bug #6685: duplicate results in Dir[]
https://bugs.ruby-lang.org/issues/6685#change-27701

Author: john_firebaugh (John Firebaugh)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) 
[x86_64-darwin11.3.0]


$ mkdir a
$ touch a/b.rb
$ irb
>> Dir['a{,/**}/*.rb']
=> ["a/b.rb", "a/b.rb"]

I expected ["a/b.rb"].
Posted by Nobuyoshi Nakada (nobu)
on 2012-07-02 07:28
(Received via mailing list)
Issue #6685 has been updated by nobu (Nobuyoshi Nakada).

Status changed from Open to Rejected

Yes, it's expected.
----------------------------------------
Bug #6685: duplicate results in Dir[]
https://bugs.ruby-lang.org/issues/6685#change-27704

Author: john_firebaugh (John Firebaugh)
Status: Rejected
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410) 
[x86_64-darwin11.3.0]


$ mkdir a
$ touch a/b.rb
$ irb
>> Dir['a{,/**}/*.rb']
=> ["a/b.rb", "a/b.rb"]

I expected ["a/b.rb"].
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.