[PATCH] vm option '-v' causes exception
Reported by Vincent Landgraf | June 8th, 2008 @ 02:05 PM | in 1.0 preview
I have followed the 'getting-started' guide to compile and go for a first test, but the vm option '-v' causes an exception. I expected that it will show me the version of the software. I have seen the code and it seems that this case (where just the '-v' is passed) is not mentioned.
vincent-landgrafs-mac-mini:code vincentlandgraf$ shotgun/rubinius -v
rubinius 0.8.0 (ruby 1.8.6 compatible) (614d3e32f) (06/08/2008) [i686-apple-darwin9.3.0]
An exception has occurred:
Unable to find a script '-v' to run (LoadError)
Backtrace:
Object#__script__ at kernel/loader.rb:291
vincent-landgrafs-mac-mini:code vincentlandgraf$ shotgun/rubinius --version
Invalid switch '--version'
Usage: rubinius [options] [file]
File may be any valid Ruby source file (.rb) or a compiled Ruby file (.rbc).
Options:
-d Enable debugging output and set $DEBUG to true.
-dc Display debugging information for the compiler.
-dl Display debugging information for the loader.
-debug Launch the debugger.
-remote-debug Run the program under the control of a remote debugger.
-e 'code' Directly compile and execute code (no file provided).
-Idir1[:dir2] Add directories to $LOAD_PATH.
-p Run the profiler.
-ps Run the Selector profiler.
-pss Run the SendSite profiler.
-rlibrary Require library before execution.
-w Enable warnings. (currently does nothing--compatibility)
-v Display the version and set $VERBOSE to true.
vincent-landgrafs-mac-mini:code vincentlandgraf$ shotgun/rubinius -v
rubinius 0.8.0 (ruby 1.8.6 compatible) (614d3e32f) (06/08/2008) [i686-apple-darwin9.3.0]
An exception has occurred:
Unable to find a script '-v' to run (LoadError)
Backtrace:
Object#__script__ at kernel/loader.rb:291
System: Mac OS X 10.5.3
Darwin 9.3.0 Darwin Fri May 23 00:49:16 PDT 2008;
root:xnu-1228.5.18~1/RELEASE_I386 i386
Comments and changes to this ticket
-
Vincent Landgraf June 8th, 2008 @ 02:36 PM
i have created a little patch for this:
iff --git a/kernel/loader.rb b/kernel/loader.rb index 82b4c49..817d325 100644 --- a/kernel/loader.rb +++ b/kernel/loader.rb @@ -143,6 +143,7 @@ begin puts "rubinius #{RBX_VERSION} (ruby #{RUBY_VERSION} compatible) (#{Rubinius::BUILDREV[0..8]}) (#{RUBY_REL $VERBOSE = true version_requested = true + arg = nil when "-w" # do nothing (HACK) when '-dc'by adding the "arg = nil" the vm don't trys to open the script "-v"
example usage.
vincent-landgrafs-mac-mini:code vincentlandgraf$ shotgun/rubinius -e "puts 'hello rubinus'" -v rubinius 0.8.0 (ruby 1.8.6 compatible) (614d3e32f) (06/08/2008) [i686-apple-darwin9.3.0] hello rubinus vincent-landgrafs-mac-mini:code vincentlandgraf$ shotgun/rubinius -v rubinius 0.8.0 (ruby 1.8.6 compatible) (614d3e32f) (06/08/2008) [i686-apple-darwin9.3.0] -
Vincent Landgraf June 8th, 2008 @ 03:02 PM
- → Title changed from [BUG] vm option '-v' causes exception to [PATCH] vm option '-v' causes exception
-
Vincent Landgraf June 9th, 2008 @ 08:36 AM
- no changes were found...
-
-
Federico Builes June 20th, 2008 @ 07:19 PM
- → State changed from new to resolved
Thanks for reporting both issues, they've been fixed in the latest release (0.9). Closing as resolved.
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 »
