mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
![]() Also add --script option to turn the option back on. Previously there wasn't a way to get an interactive IRB session and access arguments provided on the command line. Additionally, handle `-` as script as stdin. In Unix-like tools, `-` means to take standard input instead of a file. This doesn't result in exactly the same output for: ``` echo 'p ARGV' > args.rb; irb args.rb a b c ``` and ``` echo 'p ARGV' | irb - a b c ``` Due to how irb handles whether stdin is a tty. However, this change allows use of `-` as a argument, instead of giving an unrecognized switch error. This required some small changes to context.rb (to handle `-` as standard input) and input-method.rb (to have FileInputMethod accept IO arguments in addition to strings). Implements [Feature #15371] https://github.com/ruby/irb/commit/4192683ba2 |
||
---|---|---|
.. | ||
yamatanooroti | ||
test_cmd.rb | ||
test_color.rb | ||
test_color_printer.rb | ||
test_completion.rb | ||
test_context.rb | ||
test_history.rb | ||
test_init.rb | ||
test_option.rb | ||
test_raise_no_backtrace_exception.rb | ||
test_ruby_lex.rb | ||
test_workspace.rb |