[narray-miss] 01/03: Import upstream: 1.4.0
Youhei SASAKI
uwabami-guest at moszumanska.debian.org
Sun Sep 4 07:08:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
uwabami-guest pushed a commit to branch master
in repository narray-miss.
commit 7aa68be50a44b83aa7f2b31358c8d4fe202a1210
Author: Youhei SASAKI <uwabami at gfd-dennou.org>
Date: Sun Sep 4 16:02:11 2016 +0900
Import upstream: 1.4.0
Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
---
lib/narray_miss/narray_miss.rb | 41 +++++++++++++++++++++++++++--------------
lib/narray_miss/version.rb | 2 +-
test/test_narray_miss.rb | 2 +-
3 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/lib/narray_miss/narray_miss.rb b/lib/narray_miss/narray_miss.rb
index cd19326..e04c634 100644
--- a/lib/narray_miss/narray_miss.rb
+++ b/lib/narray_miss/narray_miss.rb
@@ -34,26 +34,39 @@ To use NArrayMiss class, you need invoking "require 'narray_miss.rb'" in your sc
=end
-if defined?(NumRu::NArray)
- NARRAY = NumRu::NArray
-elsif defined?(NArray)
+case ENV["NARRAY_TYPE"]
+when "narray"
+ require 'narray'
NARRAY = NArray
-else
+when "numru-narray"
+ require 'numru/narray'
+ NARRAY = NumRu::NArray
+when nil
- begin
- require 'narray'
+ if defined?(NumRu::NArray)
+ NARRAY = NumRu::NArray
+ elsif defined?(NArray)
NARRAY = NArray
- rescue LoadError
- err = $!
+ else
+
begin
- require 'numru/narray'
- NARRAY = NumRu::NArray
+ require 'narray'
+ NARRAY = NArray
rescue LoadError
- STDERR.puts "You should install numru-narray or narray"
- raise err
+ err = $!
+ begin
+ require 'numru/narray'
+ NARRAY = NumRu::NArray
+ rescue LoadError
+ STDERR.puts "You should install numru-narray or narray"
+ raise err
+ end
end
+
end
+else
+ raise "NARRAY_TYPE (#{ENV["NARRAY_TYPE"]}) is invalid"
end
@@ -1020,12 +1033,12 @@ go back to ((<Index>))
=== Mask and missing value
--- NArrayMiss#set_valid(index)
validate element at ((|index|)).
- ((|index|)) must be (({Integer, Range, Array, or ture})).
+ ((|index|)) must be (({Integer, Range, Array, or true})).
--- NArrayMiss#validation(index)
alias to set_valid
--- NArrayMiss#set_invalid(index)
invaliadate element at ((|index|)).
- ((|index|)) must be (({Integer, Range, Array, or ture})).
+ ((|index|)) must be (({Integer, Range, Array, or true})).
--- NArrayMiss#invalidation(index)
alias to set_invalid
--- NArrayMiss#all_valid
diff --git a/lib/narray_miss/version.rb b/lib/narray_miss/version.rb
index 675aef4..7a6d0c3 100644
--- a/lib/narray_miss/version.rb
+++ b/lib/narray_miss/version.rb
@@ -1,3 +1,3 @@
class NArrayMiss
- VERSION = "1.3.1"
+ VERSION = "1.4.0"
end
diff --git a/test/test_narray_miss.rb b/test/test_narray_miss.rb
index eda37c7..239b209 100644
--- a/test/test_narray_miss.rb
+++ b/test/test_narray_miss.rb
@@ -1,7 +1,7 @@
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
require "narray_miss"
require "test/unit"
-include NumRu if defined?(:NumRu)
+include NumRu if defined?(NumRu)
class NArrayMissTest < Test::Unit::TestCase
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/narray-miss.git
More information about the Pkg-grass-devel
mailing list