rangeary 1.0 → 1.0.1
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 +4 -4
- data/ChangeLog +5 -0
- data/README.ja.rdoc +6 -2
- data/lib/rangeary/rangeary.rb +3 -3
- data/test/test_rangeary.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce59a0d560f8185ea9172d79c4cf9d413cb28f301d2489a57bb793ea38556eab
|
4
|
+
data.tar.gz: 8bd9669e0aeb4f56cae9aebdfdf2f0e40870a23ddd45456130c0ca4097c3affb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ed9d23fdde4cf4f64bc49165509fb2ef46d42b19aee889582810d7d394aca3f1b1bfc36abb72e4d68ca52a5cbfde240b65ff753e213b27fd1ea481cf70c91d9
|
7
|
+
data.tar.gz: 07d16c90af393dac4b20083f2806027696d31dd82f84e6e37b10dde091414623aefaa2642102a5ee94898c28ec57cd346a526335298f35a5a19b7360c3ef61a4
|
data/ChangeLog
CHANGED
data/README.ja.rdoc
CHANGED
@@ -319,7 +319,9 @@ The last example above shows how it works.
|
|
319
319
|
|
320
320
|
== Known bugs
|
321
321
|
|
322
|
-
*
|
322
|
+
* To suppress warnings in Ruby-2.7, {RangeExtd}[https://rubygems.org/gems/range_extd] must be Ver.1.1.1 or later.
|
323
|
+
* <tt>Rangeary.new(-6..-5, 2..5, 8..8).last_element(3)</tt> returns
|
324
|
+
<tt>[3, 4, 5]</tt> wrongly in Ruby-2.7 but correctly in Ruby-2.6.x or earlier.
|
323
325
|
|
324
326
|
This library requires Ruby 2.1 or above (it may work all right with
|
325
327
|
Ruby 1.9.3, however I have never tested it).
|
@@ -663,7 +665,9 @@ Rangearyオブジェクトも同じ無限大をもつべきです。デフォル
|
|
663
665
|
|
664
666
|
== 既知のバグ
|
665
667
|
|
666
|
-
*
|
668
|
+
* Ruby-2.7 で警告を出さないためには、{RangeExtd}[https://rubygems.org/gems/range_extd] は、Ver.1.1.1 以上であること。
|
669
|
+
* <tt>Rangeary.new(-6..-5, 2..5, 8..8).last_element(3)</tt> は、
|
670
|
+
Ruby-2.6.x 以前は正しい値を返すが、Ruby-2.7 ではなぜか <tt>[3, 4, 5]</tt> と誤った値を返す。
|
667
671
|
|
668
672
|
このライブラリは Ruby 2.1 以上を必要とします。
|
669
673
|
|
data/lib/rangeary/rangeary.rb
CHANGED
@@ -29,8 +29,8 @@ end # req_files.each do |req_file|
|
|
29
29
|
|
30
30
|
|
31
31
|
|
32
|
-
def Rangeary(*rest)
|
33
|
-
Rangeary.new(*rest)
|
32
|
+
def Rangeary(*rest, **hs)
|
33
|
+
Rangeary.new(*rest, **hs)
|
34
34
|
end
|
35
35
|
|
36
36
|
# =Class Rangeary < Array
|
@@ -622,7 +622,7 @@ class Rangeary < Array
|
|
622
622
|
# Initialisation
|
623
623
|
a1 = r1.to_a
|
624
624
|
a2 = r2.to_a
|
625
|
-
rc = Rangeary.new( RangeExtd::NONE, hsInherited )
|
625
|
+
rc = Rangeary.new( RangeExtd::NONE, **hsInherited )
|
626
626
|
|
627
627
|
if a1.empty? || a2.empty?
|
628
628
|
return rc
|
data/test/test_rangeary.rb
CHANGED
@@ -390,7 +390,7 @@ end
|
|
390
390
|
assert_equal rany2, Rangeary(1..2, 4..InfF)
|
391
391
|
assert_equal rany2, [1..2, 4..InfF]
|
392
392
|
assert_equal [1..2, 4..InfF], rany2
|
393
|
-
assert_equal Rangeary(?a..), [?a..InfP]
|
393
|
+
assert_equal Rangeary(?a..), [?a..InfP] # This raises the uncapturable SyntaxError for Ruby 2.5 and before anyway.
|
394
394
|
assert_equal [?a..InfP], Rangeary(?a..)
|
395
395
|
end
|
396
396
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rangeary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masa Sakano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: range_extd
|
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
requirements: []
|
68
|
-
rubygems_version: 3.
|
68
|
+
rubygems_version: 3.1.2
|
69
69
|
signing_key:
|
70
70
|
specification_version: 4
|
71
71
|
summary: Rangeary - class to represent any 1-dimensional multiple-range
|