carray 1.5.6 → 1.5.7

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
  SHA256:
3
- metadata.gz: baf289b957e96d1df3156ea74f06a7bb44cbd856005f42a9f7531367413c9cff
4
- data.tar.gz: 06feaeef398f1e130e658df742d370d54b003cd6af67bac47a2ae40b58e40007
3
+ metadata.gz: 53f410eef744cd7d2c38db76556f150cbb1820054bc938fd39d6f45c09dce148
4
+ data.tar.gz: a3a8994279e0d7b56adbf5a5427390867c6f8fcc4bef5adacdd792a7865efc6b
5
5
  SHA512:
6
- metadata.gz: 0f62fb53d5344bdc400c211d6938460f136215e0a629c60d047bef313e053d3500c2b0c02e30a77810fa4b6ed7e67ab52edbc93f7ebc264d3441a20bc01b4207
7
- data.tar.gz: acb0098036a13fff4a483aa6fb5fe5fc0dc65bd0e8d356b6037a44b4aa285f231e98d39687090de73b225a540c3b946c3be5a75746e68194ca9b0d7bfdd823e4
6
+ metadata.gz: 38a07507ad136d73bc1cbc136853577546187fb5852450471d5ca149d8b8e5edebbd28a688391c0f27666327f90b69421885cea17cbdab6e78cb92ed6ca8844b
7
+ data.tar.gz: f62fedda0c4d535ed8686cc5a21c96db5e670eb5710eece004d75fc22fcbb89a8dc74b51d412eef65f55454b6885b699ff46b0d8d5c78cdf1413374613218b83
data/NEWS.md CHANGED
@@ -1,6 +1,18 @@
1
1
  ChangeLog of Ruby/CArray
2
2
  ========================
3
3
 
4
+ 1.5.6 -> 1.5.7
5
+
6
+ * [Mod] Modify the methods 'CArray#first' and 'CArray#last' to return nil when the number of elements is zero
7
+ * [Fix] Added check of having ArithmeticSeuqence in ruby_carray.c
8
+
9
+ 1.5.5 -> 1.5.6
10
+
11
+ * [Mod] Modify CArray access methods to accept Enumerator::ArithmeticSequence for index, address
12
+ * [Mod] Remove some gem autoloading (io_csv, io_sqlite3, rmagick, cairo, opencv, ffi)
13
+ * [Mod] Modify 'CArray#valid_index?' and 'CArray#valid_addr?' to accept negative integers
14
+ * [Mod] Modify the methods 'CArray#double' etc not to raise error for invalid string in conversion into float
15
+
4
16
  1.5.4 -> 1.5.5
5
17
 
6
18
  * [Fix] Fix recognition of "atan2", ... in "math.h"
data/carray.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification::new do |s|
2
2
 
3
- version = "1.5.6"
3
+ version = "1.5.7"
4
4
 
5
5
  files = Dir.glob("**/*") + [".yardopts"] -
6
6
  [
data/ext/ruby_carray.c CHANGED
@@ -11,7 +11,9 @@
11
11
  #include "carray.h"
12
12
  #include "version.h"
13
13
 
14
+ #ifdef HAVE_RB_ARITHMETIC_SEQUENCE_EXTRACT
14
15
  VALUE rb_cArithSeq;
16
+ #endif
15
17
 
16
18
  VALUE rb_eCADataTypeError;
17
19
  VALUE rb_mCA;
@@ -78,7 +80,9 @@ Init_carray_ext ()
78
80
 
79
81
  /* Classes and Modules */
80
82
 
83
+ #ifdef HAVE_RB_ARITHMETIC_SEQUENCE_EXTRACT
81
84
  rb_cArithSeq = rb_const_get(rb_cEnumerator, rb_intern("ArithmeticSequence"));
85
+ #endif
82
86
 
83
87
  /* -- CArray class -- */
84
88
 
data/ext/version.h CHANGED
@@ -8,9 +8,9 @@
8
8
 
9
9
  ---------------------------------------------------------------------------- */
10
10
 
11
- #define CA_VERSION "1.5.6"
12
- #define CA_VERSION_CODE 156
11
+ #define CA_VERSION "1.5.7"
12
+ #define CA_VERSION_CODE 157
13
13
  #define CA_VERSION_MAJOR 1
14
14
  #define CA_VERSION_MINOR 5
15
- #define CA_VERSION_TEENY 6
16
- #define CA_VERSION_DATE "2021/02/25"
15
+ #define CA_VERSION_TEENY 7
16
+ #define CA_VERSION_DATE "2021/06/16"
data/lib/carray/basic.rb CHANGED
@@ -83,11 +83,11 @@ class CArray
83
83
  end
84
84
 
85
85
  def first
86
- self[0]
86
+ ( self.elements == 0 ) ? nil : self[0]
87
87
  end
88
88
 
89
89
  def last
90
- self[-1]
90
+ ( self.elements == 0 ) ? nil :self[-1]
91
91
  end
92
92
 
93
93
  # matchup
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carray
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroki Motoyoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-24 00:00:00.000000000 Z
11
+ date: 2021-06-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Ruby/CArray is an extension library for the multi-dimensional numerical array