Last Updated: February 25, 2016
·
586
· idrozd

Ruby Symbol#match is actually String#=~

So if you want a block form of String#match, you should cast to string first

String(i_can_be_a_symbol).match(/.*kittens are (?<opinion_on_kittens>\w+)/){|match| match['opinion_on_kittens']}