Skip to content
Create a gist now

Instantly share code, notes, and snippets.

irb(main):021:0> x = "foobar"
=> "foobar"
irb(main):022:0> x =~ /(foo)/
=> 0
irb(main):023:0> $1
=> "foo"
irb(main):024:0> { x =~ /(bar)/; puts $1}.join
=> #<Thread:0x007ff47a10cb58 dead>
irb(main):025:0> $1
=> "foo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.