lib/edtf/seasons.rb in edtf-0.0.1 vs lib/edtf/seasons.rb in edtf-0.0.2
- old
+ new
@@ -15,10 +15,10 @@
else
raise ArgumentError, "bad season format (21, 22, 23 or 24 expected; was #{new_season.inspect})"
end
end
- [:first, :second, :third, :fourth].zip(21..24).each do |quarter, code|
+ [:first, :second, :third, :fourth].zip((21..24).to_a).each do |quarter, code|
define_method("#{quarter}?") { @season == code }
define_method("#{quarter}!") { @season = code }
end
[:spring, :summer, :autumn, :winter].zip([:first, :second, :third, :fourth]).each do |season, quarter|
\ No newline at end of file