From: nobu@... Date: 2017-08-08T06:53:35+00:00 Subject: [ruby-core:82276] [Ruby trunk Bug#13786] Unexpected behavior handling shebang Issue #13786 has been updated by nobu (Nobuyoshi Nakada). Ruby tries to parse options after "ruby" in a shebang line, and assumes there are only options. So the last "ruby" is treated as "-ruby" option. ---------------------------------------- Bug #13786: Unexpected behavior handling shebang https://bugs.ruby-lang.org/issues/13786#change-66054 * Author: vo.x (Vit Ondruch) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- Ruby exhibits unexpected behavior handling this shebang: ~~~ $ cat < foo > #!/usr/bin/scl enable rh-ruby22 -- ruby > EOF $ ruby foo /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- uby (LoadError) from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require' ~~~ This was originally reported here [1]. [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1478833 -- https://bugs.ruby-lang.org/ Unsubscribe: