Skip to content

Commit

Permalink
fix: extend compatibility to rubies 2.6 and 2.5
Browse files Browse the repository at this point in the history
The `Date::Error` exception class was added with Ruby 2.7 but this gem still supports a couple of versions below that.
  • Loading branch information
matteoredz authored Oct 22, 2024
1 parent db81d23 commit ddbe801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/itax_code/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def day

def birthdate
@birthdate ||= Date.parse("#{year}-#{month}-#{day}").to_s
rescue Date::Error
rescue ArgumentError
raise DateTaxCodeError
end

Expand Down

0 comments on commit ddbe801

Please sign in to comment.