Skip to content

Instantly share code, notes, and snippets.

@headius
Created April 30, 2015 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/3e82441e925b059265a9 to your computer and use it in GitHub Desktop.
Save headius/3e82441e925b059265a9 to your computer and use it in GitHub Desktop.
[] ~/projects/jruby $ jirb
irb(main):001:0> "hello, world" =~ /(\S+) (\S+)/; h, w = $1, $2.sub("w","W"); puts "#{h} #{w}"
hello, World
=> nil
irb(main):002:0> quit
[] ~/projects/jruby $ rvm ruby-2.2 do irb
2.2.0 :001 > "hello, world" =~ /(\S+) (\S+)/; h, w = $1, $2.sub("w","W"); puts "#{h} #{w}"
hello, World
=> nil
2.2.0 :002 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment