Created
September 20, 2008 00:51
-
-
Save ELLIOTTCABLE/11692 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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