[PATCH] Kernel#open isn't MRI compliant
Reported by Jeremy Durham | November 15th, 2007 @ 08:20 PM | in 1.0 preview
calling open does not work in Rubinius like it does in MRI:
MRI
open
in `initialize': wrong number of arguments (0 for 1) (ArgumentError)
Rubinius
open
No method 'open' on an instance of Object. (NoMethodError)
Comments and changes to this ticket
-
Evan Phoenix November 15th, 2007 @ 09:12 PM
- → State changed from new to open
Kernel#open is not yet implemented on rubinius.
Care to submit a patch?
-
Tilman Sauerbeck November 18th, 2007 @ 02:42 AM
Kernel#open was added in be8739b20d9a02888a6558c76892e108b313829c.
Jeremy, does that commit fix the issue here?
-
Jeremy Durham November 18th, 2007 @ 06:12 AM
Not entirely. Someone still needs to add support for |, and we need specs for Kernel#open. I'll try to do a bit of both today.
-
Tilman Sauerbeck December 9th, 2007 @ 02:04 PM
- → Title changed from open should work without File/IO to Kernel#open isn't MRI compliant
-
Oleg Andreev December 10th, 2007 @ 05:29 PM
- → Title changed from Kernel#open isn't MRI compliant to [PATCH] Kernel#open isn't MRI compliant
I fixed that with StringValue (throws TypeError for non-strings). Also additional spec for StringValue is added to String_spec.rb to ensure this behaviour for the future.
-
Oleg Andreev December 10th, 2007 @ 05:32 PM
Just a little reminder for rubinius beginners: run rake build:load_order && rake build when you change something in kernel.rb
-
Oleg Andreev December 10th, 2007 @ 06:19 PM
IO#popen and Kernel#open("|stuff") is not well spec-ed right now.
I see kernel/open_spec.rb requires open("|date") to return IO object, but BidirectionalPipe is returned instead.
Kernel#open should open an io when path starts with a pipe FAILED
Expected BidirectionalPipe to equal IO
main.__script__ {} at spec/core/kernel/open_spec.rb:26
...
Evan & Co need to decide about this design.
However, it is good idea to spec IO#popen, #open etc. They are totally empty right now. I'll try this a bit later.
-
Eero Saynatkari January 20th, 2008 @ 01:28 PM
- → State changed from open to resolved
Closing this, see #268.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
