carray 1.3.0 → 1.3.1

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: a9d973497b72643e3eff0ba9fe6f27d1c1551b30
4
- data.tar.gz: 4d498ed02138ef9003d36ffa9b22e1e1d970923b
3
+ metadata.gz: e1a52d8ff099ce6a0684494a38fc75133ceec617
4
+ data.tar.gz: 3d6e5ab21492c787c439e25ddfee15e8d46e887a
5
5
  SHA512:
6
- metadata.gz: 79ed70d463d345e8ddec07d9742054bd85d9fcaf4645d4f9f40ee5f872ce85b99b5cc92e5743ca2b3949cf530497762d45d1651ba365e22024a64819ea102b83
7
- data.tar.gz: de527fdb98be83795c552c69fe350581f0b4773bff013a5d68947c5fb46305a369d48cba9aedeaa76b426bb372c048f8433a6f4a2969bc7f0a99b9ef34371d75
6
+ metadata.gz: 8087600340729cbafb942bfa1163474c515f98a2fa7270321c0ddaaa0e19ea939751801a104fc6fdf4600db211ff814e0bc1c7e3ee595a855c2916e024c95e4c
7
+ data.tar.gz: 25c9b5959fbf10e12a48e5d00cbb64db362591feeda30f9b5c88820aaa091e2ec4a9dcc38330a7c1f332a62d8dcd1eace19b556c91d1217bd4d151deba0b274d
@@ -317,7 +317,7 @@ rb_ca_unbound_repeat (int argc, VALUE *argv, VALUE self)
317
317
  args = ID2SYM(rb_intern("*"));
318
318
  obj = rb_ca_unbound_repeat(1, (VALUE*)&args, self);
319
319
  return ca_ubrep_bind_with(obj, argv[0]);
320
- }
320
+ }
321
321
 
322
322
  rep_rank = argc;
323
323
 
@@ -59,14 +59,14 @@ rb_ca_store_index (VALUE self, ca_size_t *idx, VALUE rval)
59
59
  return rval;
60
60
  }
61
61
 
62
- if ( rval == CA_UNDEF ) { /* set mask at the element */
62
+ if ( rval == CA_UNDEF ) { /* set mask of the element at the index 'idx' */
63
63
  ca_update_mask(ca);
64
64
  if ( ! ca->mask ) {
65
65
  ca_create_mask(ca);
66
66
  }
67
67
  ca_store_index(ca->mask, idx, &one);
68
68
  }
69
- else { /* unset mask and set value at the element */
69
+ else { /* unset mask and set value of the element at the index 'idx' */
70
70
 
71
71
  /* unset mask */
72
72
  ca_update_mask(ca);
@@ -105,6 +105,8 @@ ca_is_all_masked (void *ap)
105
105
  }
106
106
  }
107
107
 
108
+ /* create mask array if array has mask but has not mask array */
109
+
108
110
  void
109
111
  ca_update_mask (void *ap)
110
112
  {
@@ -131,7 +133,7 @@ ca_create_mask (void *ap)
131
133
 
132
134
  if ( ! ca->mask ) {
133
135
  ca_func[ca->obj_type].create_mask(ca);
134
- ca_set_flag(ca->mask, CA_FLAG_MASK_ARRAY);
136
+ ca_set_flag(ca->mask, CA_FLAG_MASK_ARRAY); /* set array as mask array */
135
137
  if ( ca_is_virtual(ca) ) {
136
138
  if ( CAVIRTUAL(ca)->attach ) {
137
139
  ca_attach(ca->mask);
@@ -58,18 +58,21 @@ module CA
58
58
  def self.each_load_path (name) # :nodoc:
59
59
  autoload_dirs = $:.clone
60
60
  if defined? Gem
61
- begin
62
- Gem::Specification.each do |spec|
63
- if spec.name =~ /carray/
64
- spec.require_paths.each do |path|
65
- if path !~ /^\//
66
- path = File.join(spec.full_gem_path, path)
67
- end
68
- autoload_dirs.push(path)
61
+ autoload_dirs.push File.expand_path(File.join(__FILE__,"..","..",".."))
62
+ accounted = {}
63
+ Gem::Specification.each do |spec|
64
+ if accounted.has_key?(spec.name)
65
+ next
66
+ end
67
+ if spec.name =~ /carray\-/
68
+ spec.require_paths.each do |path|
69
+ if path !~ /^\//
70
+ path = File.join(spec.full_gem_path, path)
69
71
  end
72
+ autoload_dirs.push(path)
70
73
  end
74
+ accounted[spec.name] = true
71
75
  end
72
- rescue Gem::LoadError
73
76
  end
74
77
  end
75
78
  autoload_dirs.each do |path|
@@ -87,7 +90,10 @@ end
87
90
  CA.each_load_path("carray/autoload") {
88
91
  Dir["autoload_*.rb"].each do |basename|
89
92
  if basename =~ /\A(autoload_.+)\.rb\Z/
90
- require "carray/autoload/" + $1
93
+ begin
94
+ require "carray/autoload/" + $1
95
+ rescue LoadError
96
+ end
91
97
  end
92
98
  end
93
99
  }
data/version.h CHANGED
@@ -10,9 +10,9 @@
10
10
 
11
11
  ---------------------------------------------------------------------------- */
12
12
 
13
- #define CA_VERSION "1.3.0"
14
- #define CA_VERSION_CODE 130
13
+ #define CA_VERSION "1.3.1"
14
+ #define CA_VERSION_CODE 131
15
15
  #define CA_VERSION_MAJOR 1
16
16
  #define CA_VERSION_MINOR 3
17
- #define CA_VERSION_TEENY 0
17
+ #define CA_VERSION_TEENY 1
18
18
  #define CA_VERSION_DATE "2017/11/18"
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.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroki Motoyoshi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-18 00:00:00.000000000 Z
11
+ date: 2018-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: narray
@@ -360,7 +360,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
360
360
  version: '0'
361
361
  requirements: []
362
362
  rubyforge_project:
363
- rubygems_version: 2.6.11
363
+ rubygems_version: 2.6.13
364
364
  signing_key:
365
365
  specification_version: 4
366
366
  summary: Multi-dimesional array class