The following commit has been merged in the master branch:
commit bc780af3e8bd11b35b4c357377786e770a39498d
Author: Youhei SASAKI <uwab...@gfd-dennou.org>
Date:   Mon Dec 13 21:10:38 2010 +0900

    update from CVS head
    
    * Change Maintainer: Debian GIS Project
    * Add me to Uploadres
    * Add DM-Upload-Allowed: I became Debian Maintainer
    * Add Vcs-* field

diff --git a/debian/changelog b/debian/changelog
index 3368c01..afa701c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,4 +2,4 @@ narray-miss (1.1.2-1) unstable; urgency=low
 
   * Initial release (Closes: #523872)
 
- -- Youhei SASAKI <uwab...@gfd-dennou.org>  Sun, 04 Apr 2010 18:17:29 +0900
+ -- Youhei SASAKI <uwab...@gfd-dennou.org>  Mon, 13 Dec 2010 20:09:53 +0900
diff --git a/debian/control b/debian/control
index c0f24ac..e5ef771 100644
--- a/debian/control
+++ b/debian/control
@@ -1,10 +1,13 @@
 Source: narray-miss
 Section: ruby
 Priority: optional
-Maintainer: Youhei SASAKI <uwab...@gfd-dennou.org>
-Build-Depends: cdbs, debhelper (>= 7), ruby-pkg-tools, ruby1.8, ruby1.9.1
-Standards-Version: 3.8.4
+Maintainer: Debian GIS Project <pkg-grass-devel@lists.alioth.debian.org>
+Uploaders: Youhei SASAKI <uwab...@gfd-dennou.org>
+Build-Depends: cdbs, debhelper (>= 7), ruby-pkg-tools, ruby1.8, ruby1.9.1, 
quilt
+Standards-Version: 3.9.1
 Homepage: http://ruby.gfd-dennou.org/products/narray_miss/index.html
+Vcs-Git: git://git.debian.org/git/pkg-grass/narray-miss.git
+Vcs-Browser: http://git.debian.org/?p=pkg-grass/narray-miss.git
 
 Package: libnarray-miss-ruby
 Architecture: all
diff --git a/debian/patches/CVSUpdate b/debian/patches/CVSUpdate
new file mode 100644
index 0000000..19dbb64
--- /dev/null
+++ b/debian/patches/CVSUpdate
@@ -0,0 +1,143 @@
+--- narray-miss.orig/lib/narray_miss.rb
++++ narray-miss/lib/narray_miss.rb
+@@ -108,7 +108,7 @@
+      create (({NArrayMiss})) form [((|value|)), ...].
+ --- NArrayMiss.to_nam(array [,mask])
+      create (({NArrayMiss})) from ((|array|)).
+-     ((|array|)) must be (({Array})) or (({NArray})).
++     ((|array|)) must be (({Numeric})) (({Array})) or (({NArray})).
+ --- NArrayMiss.to_nam_no_dup(array [,mask])
+      convert from ((|array|)) to (({NArrayMiss})).
+ 
+@@ -161,7 +161,7 @@
+ 
+     if arg.length==2 then
+       mask = arg[1]
+-      if Numeric===mask then mask = [mask] end
++      if Numeric===mask then mask = array.ne(mask) end
+       if Array===mask then
+       mask = NArray.to_na(mask).ne(0)
+       end
+@@ -183,7 +183,7 @@
+     __new__(array,mask)
+   end
+   def self.to_nam(*arg)
+-    if !(Numeric===arg[0]) && Array===arg[0] && !arg[0].is_a?(NArray)
++    if !(Numeric===arg[0]) && !(Array===arg[0]) && !arg[0].is_a?(NArray)
+       raise "first argument must be Numeric, NArray or Array"
+     end
+     arg[0] = arg[0].dup if !(Numeric===arg[0])
+@@ -260,11 +260,20 @@
+ =end
+ 
+   def [](*arg)
+-    obj = @array[*arg]
+-    if Numeric===obj
+-      return obj
++    if arg[0].class == NArrayMiss && arg[0].typecode == BYTE
++      obj = @array[arg[0].to_na(0)]
++      if Numeric===obj
++        return obj
++      else
++        return NArrayMiss.to_nam_no_dup(obj)
++      end
+     else
+-      return NArrayMiss.to_nam_no_dup(obj,@mask[*arg])
++      obj = @array[*arg]
++      if Numeric===obj
++        return obj
++      else
++        return NArrayMiss.to_nam_no_dup(obj,@mask[*arg])
++      end
+     end
+   end
+   def slice(*arg)
+@@ -295,12 +304,20 @@
+   end
+ 
+   def []=(*arg)
+-    self.set_without_validation(*arg)
+-    if arg[-1].class != NArrayMiss && arg[-1] then
+-      if arg.length==1 then
+-        @mask=1
+-      else
+-        @mask[*arg[0..-2]] = 1
++    if arg.length == 2 && arg[0].class == NArrayMiss && arg[0].typecode == 
BYTE
++      idx = arg[0].to_na(0)
++      self.set_without_validation(idx,arg[-1])
++      if arg[-1].class != NArrayMiss && arg[-1] then
++        @mask[idx] = 1
++      end
++    else
++      self.set_without_validation(*arg)
++      if arg[-1].class != NArrayMiss && arg[-1] then
++        if arg.length==1 then
++          @mask=1
++        else
++          @mask[*arg[0..-2]] = 1
++        end
+       end
+     end
+     return self
+@@ -980,11 +997,11 @@
+     obj
+   end
+   def hton
+-    NArray.to_nam(@array.hton,@mask.hton)
++    NArrayMiss.to_nam(@array.hton,@mask.hton)
+   end
+   alias :ntoh :hton
+   def htov
+-    NArray.to_nam(@array.htov,@mask.htov)
++    NArrayMiss.to_nam(@array.htov,@mask.htov)
+   end
+   alias :vtoh :htov
+ 
+@@ -1036,10 +1053,12 @@
+ 
+   def set_valid(*pos)
+     @mask[*pos] = 1
++    self
+   end
+   alias validation set_valid
+   def set_invalid(*pos)
+     @mask[*pos] = 0
++    self
+   end
+   alias invalidation set_invalid
+   def all_valid
+@@ -1186,7 +1205,7 @@
+     sep = ", "
+     const = Hash.new
+     NArray.constants.each{|c| const[NArray.const_get(c)] = c}
+-    str_ret = "NArrayMiss."+const[typecode].downcase+"("+shape.join(",")+"):"
++    str_ret = 
"NArrayMiss."+const[typecode].to_s.downcase+"("+shape.join(",")+"):"
+     if rank == 0 then
+       str_ret += " []"
+       return str_ret
+@@ -1272,7 +1291,7 @@
+   def routine1(arg,dummy)
+     flag=true
+     if Numeric===arg then
+-      term1 = @array
++      term1 = @array.dup
+       term2 = arg
+       mask = true
+     elsif arg.class == Array then
+@@ -1281,13 +1300,13 @@
+       term2 = NArray.to_na(arg)
+       mask = NArray.byte(*term2.shape).fill(1)
+     elsif arg.class == NArray then
+-      term1 = @array
++      term1 = @array.dup
+       ter...@mask.not] = dummy
+-      term2 = arg
++      term2 = arg.dup
+       mask = NArray.byte(*term2.shape).fill(1)
+     elsif arg.class == NArrayMiss then
+       mask = arg.get_mask
+-      term1 = @array
++      term1 = @array.dup
+       ter...@mask.not] = dummy
+       term2 = arg.to_na
+       term2[arg.get_mask!.not] = dummy
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7686bc7
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+CVSUpdate
diff --git a/debian/rules b/debian/rules
index 41183d6..f06c6a8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,5 +5,6 @@ LIB_PACKAGE_FILTER = %-ruby $(patsubst 
%,\%-ruby%,$(NARRAY_MISS_RUBY_VERSIONS))
 DEB_INSTALL_DOCS_ALL := doc/narray_miss.html
 
 include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
 include /usr/share/ruby-pkg-tools/1/class/ruby-setup-rb.mk
 

-- 
Additional Ruby Class handling missing value

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel

Reply via email to