Skip to content

Commit

Permalink
Add mspec -t x19 to run Rubinius in 1.9 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
evanphx committed Jul 5, 2011
1 parent 2930de0 commit a98546a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion mspec/lib/mspec/commands/mspec.rb
Expand Up @@ -163,7 +163,9 @@ def run
more = ["--args", config[:target]] + argv
exec "gdb", *more
else
exec config[:target], *argv
cmd, *rest = config[:target].split(/\s+/)
argv = rest + argv unless rest.empty?
exec cmd, *argv
end
end
end
Expand Down
6 changes: 5 additions & 1 deletion mspec/lib/mspec/helpers/ruby_exe.rb
Expand Up @@ -73,7 +73,11 @@ def ruby_exe_options(option)
when :engine
case RUBY_NAME
when 'rbx'
"bin/rbx"
if Rubinius.ruby19?
"bin/rbx -X19"
else
"bin/rbx"
end
when 'jruby'
"bin/jruby"
when 'maglev'
Expand Down
2 changes: 2 additions & 0 deletions mspec/lib/mspec/utils/options.rb
Expand Up @@ -215,6 +215,8 @@ def targets
config[:target] = 'ruby1.9'
when 'x', 'rubinius'
config[:target] = './bin/rbx'
when 'x19', 'rubinius19'
config[:target] = './bin/rbx -X19'
when 'X', 'rbx'
config[:target] = 'rbx'
when 'j', 'jruby'
Expand Down

0 comments on commit a98546a

Please sign in to comment.