{"action":"opened","issue":{"url":"https://api.github.com/repos/RubyMoney/monetize/issues/50","labels_url":"https://api.github.com/repos/RubyMoney/monetize/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/RubyMoney/monetize/issues/50/comments","events_url":"https://api.github.com/repos/RubyMoney/monetize/issues/50/events","html_url":"https://github.com/RubyMoney/monetize/issues/50","id":96186411,"number":50,"title":"Unexpected Behavior for Hypen Input","user":{"login":"DanielRuskin1","id":8419573,"avatar_url":"https://avatars.githubusercontent.com/u/8419573?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielRuskin1","html_url":"https://github.com/DanielRuskin1","followers_url":"https://api.github.com/users/DanielRuskin1/followers","following_url":"https://api.github.com/users/DanielRuskin1/following{/other_user}","gists_url":"https://api.github.com/users/DanielRuskin1/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielRuskin1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielRuskin1/subscriptions","organizations_url":"https://api.github.com/users/DanielRuskin1/orgs","repos_url":"https://api.github.com/users/DanielRuskin1/repos","events_url":"https://api.github.com/users/DanielRuskin1/events{/privacy}","received_events_url":"https://api.github.com/users/DanielRuskin1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-20T23:20:55Z","updated_at":"2015-07-20T23:20:55Z","closed_at":null,"body":"I've noticed some unexpected behavior with hyphen input in version 1.1.0.\r\n\r\n```\r\n[11] pry(main)> \"-foo\".to_money(\"USD\")\r\n=> #<Money fractional:0 currency:USD>\r\n[12] pry(main)> \"--foo\".to_money(\"USD\")\r\nArgumentError: Invalid currency amount (hyphen)\r\nfrom .rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/monetize-1.1.0/lib/monetize.rb:85:in `extract_cents'\r\n```\r\n\r\nI think it's because the gem is interpreting the first hyphen as a negative indicator - but the second hyphen as an invalid character (see https://github.com/RubyMoney/monetize/blob/master/lib/monetize.rb#L98).  Considering that other special characters generate a zero amount (e.g. `\"$|}{&*#(*\".to_money(\"USD\")`), it seems more intuitive to have a hyphen calculated as a valid character."}}