With most (all?) Ruby interpreters one can write ruby -we "..."
and have the supplied Ruby code executed (with warnings).
With RVM one can write rvm ruby foo.rb
and have the source file executed against all install开发者_如何学运维ed interpreters.
Is there a way with RVM to run a one-off line of code against all interpreters? I have tried executing both rvm ruby -we "..."
and rvm -we ruby "..."
to no good effect.
See rvm exec
.
rvm exec ruby -we 'puts "#{`which ruby`.strip} #{RUBY_VERSION}"'
精彩评论