Forum: Ruby-core [ruby-trunk - Bug #7771][Open] method 'gets' crashed

Posted by jjyr (jy j) (Guest)
on 2013-02-02 11:17
(Received via mailing list)
Issue #7771 has been reported by jjyr (jy j).

----------------------------------------
Bug #7771: method 'gets' crashed
https://bugs.ruby-lang.org/issues/7771

Author: jjyr (jy j)
Status: Open
Priority: Normal
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p374 (2013-01-15 revision 38858) [i686-linux]


method 'gets' crashed when pass arguments like "ruby test.rb hello"

example
#file test.rb only one method
gets
#end
=========

type "ruby test.rb" and enter will work well
but "ruby test.rb hello" will crash
In my machine(ubuntu 32):

ruby test.rb hello
test.rb:1:in `gets': No such file or directory - hello (Errno::ENOENT)
  from test.rb:1:in `gets'
  from test.rb:1:in `<main>'
Posted by charliesome (Charlie Somerville) (Guest)
on 2013-02-02 11:31
(Received via mailing list)
Issue #7771 has been updated by charliesome (Charlie Somerville).

Subject changed from method 'gets' crashed to method &#x27;gets&#x27; 
crashed

=begin
This is by design, (({gets})) will read from (({ARGV})) by default. If 
you want to read from the standard input even if there is a command line 
argument, use:

  $stdin.gets
=end
----------------------------------------
Bug #7771: method &#x27;gets&#x27; crashed
https://bugs.ruby-lang.org/issues/7771#change-35782

Author: jjyr (jy j)
Status: Open
Priority: Normal
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p374 (2013-01-15 revision 38858) [i686-linux]


method 'gets' crashed when pass arguments like "ruby test.rb hello"

example
#file test.rb only one method
gets
#end
=========

type "ruby test.rb" and enter will work well
but "ruby test.rb hello" will crash
In my machine(ubuntu 32):

ruby test.rb hello
test.rb:1:in `gets': No such file or directory - hello (Errno::ENOENT)
  from test.rb:1:in `gets'
  from test.rb:1:in `<main>'
Posted by charliesome (Charlie Somerville) (Guest)
on 2013-02-02 11:33
(Received via mailing list)
Issue #7771 has been updated by charliesome (Charlie Somerville).

Status changed from Open to Rejected


----------------------------------------
Bug #7771: method &#x27;gets&#x27; crashed
https://bugs.ruby-lang.org/issues/7771#change-35783

Author: jjyr (jy j)
Status: Rejected
Priority: Normal
Assignee:
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3p374 (2013-01-15 revision 38858) [i686-linux]


method 'gets' crashed when pass arguments like "ruby test.rb hello"

example
#file test.rb only one method
gets
#end
=========

type "ruby test.rb" and enter will work well
but "ruby test.rb hello" will crash
In my machine(ubuntu 32):

ruby test.rb hello
test.rb:1:in `gets': No such file or directory - hello (Errno::ENOENT)
  from test.rb:1:in `gets'
  from test.rb:1:in `<main>'
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.