month.rb 0.10.3 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 10fd25796a52b78a7dee921eff3ad951b886cda473cd327ee3ac5aaa906ec991
4
- data.tar.gz: a53923f40a0fb25c29dbecb5ca7c034b0aa7473d0a71fc69d88412f797be3868
3
+ metadata.gz: 2e2d2c2d0b65eb49360e50ef9fc40fc1939b131c8bfe4a7ad52a21f2da2e2901
4
+ data.tar.gz: db81251d5e568118dde63f6c3b054f9f463d535335bcdd59103019fe4986b9e8
5
5
  SHA512:
6
- metadata.gz: 88d28a35a4bf5c1cc7367bf4a6702a1cb391d37d03ef27998f1337bad2fbea5c6440ed99a1255f3fbf6adfd347b47fc6d2b2f21e8fdaf4d9203a2a1c8615887f
7
- data.tar.gz: e827e393a33db436eda515b38e020d8bfff7aedc4ab3cbbc933fe57b7d59f74494679b3e75309384ec5068be4eba8b760de2e8d914268761e67dbe9afcb35ff5
6
+ metadata.gz: 27042e4a568f2b7038151d3e8b9945b38bc7d84006d9e0015ec5d0251b369e1e48b5c8cae936dbd2809012d6b12fd4e5919ff18fe4532681fc65651bb15e5d99
7
+ data.tar.gz: dbd59736671f214ff8d1c5492f81b54b613b50a46fafad28ef67e6a081ae87be528b41934204dd306feb16ea291273f0900ae9b3ee7dd7bd43d2411e42975ff2
data/lib/Month/VERSION.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # Month::VERSION
3
3
 
4
4
  class Month
5
- VERSION = '0.10.3' unless defined?(VERSION)
5
+ VERSION = '0.11.0' unless defined?(VERSION)
6
6
  end
data/lib/Month/to_s.rb CHANGED
@@ -8,10 +8,11 @@ require 'Month/to_short'
8
8
  class Month
9
9
 
10
10
  def to_s(month_name_length = :long)
11
- case month_name_length.to_sym
11
+ case (month_name_length.to_sym if month_name_length.respond_to?(:to_sym))
12
12
  when :long; "#{to_long} #{year}"
13
- when :short, 'short'; "#{to_short} #{year}"
13
+ when :short; "#{to_short} #{year}"
14
14
  when :iso, :iso_8601; "#{year}-" + "%02d" % month
15
+ else; raise ArgumentError, "unknown month name length #{month_name_length.inspect} (expected :long, :short, :iso, or :iso_8601)"
15
16
  end
16
17
  end
17
18
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: month.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran