Permalink
Browse files

fixed some tortured code

  • Loading branch information...
1 parent f7d25d0 commit 6c4c47e1141ce2d7fc192e45413a4fda88113b2d @MatmaRex MatmaRex committed Mar 30, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/money/money/parsing.rb
@@ -47,8 +47,7 @@ def parse(input, currency = nil)
when // then "GBP"
end
else
- m = i.scan(/([A-Z]{2,3})/)
- m[0] ? m[0][0] : nil
+ i[/[A-Z]{2,3}/]
end
# check that currency passed and embedded currency are the same,

0 comments on commit 6c4c47e

Please sign in to comment.