Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created September 20, 2008 00:51
Show Gist options
  • Save ELLIOTTCABLE/11692 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/11692 to your computer and use it in GitHub Desktop.
class String
alias_method :__scan__, :scan
def scan *args
res = __scan__ *args
if res.first.is_a? Array and res.first.size == 1
res.map! {|a| a.first }
end
res
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment