jkf 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80b961d103b0c7155b4ac36d77e9d3ddb40a03a3
4
- data.tar.gz: b22def70291acf60b94fa289614fd8b254c6ac8f
3
+ metadata.gz: 62e414ef9443049f0ab631af44d70072f7c7e55e
4
+ data.tar.gz: 2ead76a04ded9f63ed4b0ddf13dfa107d65f2072
5
5
  SHA512:
6
- metadata.gz: 2f7e92e39cf7caa4de99366b4645de4a42a57d664eb8b10e832d1fa651a03d07d053c3f3f5eb4685a4cde3bc38f65b7c5166b8c0f65acb0d5aee33c5240d0264
7
- data.tar.gz: dca0b0cbe829920b2ef816e138592965f4b62e7ca00115de5509558853987b56150f3a11b8af6a3fb7443cfeb8102e87a0710a1bcd4cd8de5ad613ae5e826c53
6
+ metadata.gz: 2c5e351ed8a6479d9e2b620cba5cdf96da8f82adf818c1243c6a7150cc5178dad6853e108ed97379f351215e758a159f8f860e15b134df80d74494f700177367
7
+ data.tar.gz: 98ce473672fd1a672b7a1fc35f627508920632ddf7d706f398e8a4f7a03123b731c1e0baf2c6d6fe2f36408ae9b75a30d56d3ed64a4fceb5faa12474101e7832
@@ -883,6 +883,7 @@ module Jkf::Parser
883
883
  s4 = match_str("/")
884
884
  if s4 != :failed
885
885
  s5 = parse_hms
886
+ s5 = parse_ms(with_hour: true) if s5 == :failed
886
887
  if s5 != :failed
887
888
  s6 = match_str(")")
888
889
  if s6 != :failed
@@ -980,7 +981,7 @@ module Jkf::Parser
980
981
  s0
981
982
  end
982
983
 
983
- def parse_ms
984
+ def parse_ms(with_hour: false)
984
985
  s0 = @current_pos
985
986
  s1 = []
986
987
  s2 = match_regexp(/^[0-9]/)
@@ -1007,7 +1008,15 @@ module Jkf::Parser
1007
1008
  end
1008
1009
  if s3 != :failed
1009
1010
  @reported_pos = s0
1010
- s0 = s1 = { "m" => s1.join.to_i, "s" => s3.join.to_i }
1011
+ m = s1.join.to_i
1012
+ s = s3.join.to_i
1013
+ if with_hour
1014
+ h = m / 60
1015
+ m = m % 60
1016
+ s0 = s1 = { "h" => h, "m" => m, "s" => s }
1017
+ else
1018
+ s0 = s1 = { "m" => m, "s" => s }
1019
+ end
1011
1020
  else
1012
1021
  @current_pos = s0
1013
1022
  s0 = :failed
@@ -1,3 +1,3 @@
1
1
  module Jkf
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jkf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - iyuuya