* Don't use Deprecate but Deprecated of devel/ruby-deprecated package.

* Fix a scheme of updating hash.

Bump PKGREVISION.
This commit is contained in:
taca 2011-08-12 15:58:36 +00:00
parent f692f7c24b
commit f07d2ebac4
4 changed files with 44 additions and 3 deletions

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.4 2011/06/08 14:46:05 taca Exp $
# $NetBSD: Makefile,v 1.5 2011/08/12 15:58:36 taca Exp $
DISTNAME= dbi-0.4.5
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= databases ruby
MAINTAINER= taca@NetBSD.org

View file

@ -1,5 +1,7 @@
$NetBSD: distinfo,v 1.2 2010/09/10 04:22:08 taca Exp $
$NetBSD: distinfo,v 1.3 2011/08/12 15:58:36 taca Exp $
SHA1 (dbi-0.4.5.gem) = 4b56d97772c8e9cbcd0a10414a681c255089a5bc
RMD160 (dbi-0.4.5.gem) = d92baf34b31d9c9cefdb3780e2e7f20bafd2952c
Size (dbi-0.4.5.gem) = 73728 bytes
SHA1 (patch-lib_dbi.rb) = 56dfaeb016a498d2f9525a0499d016f0025f329c
SHA1 (patch-lib_dbi_columninfo.rb) = 7576fee7475171d16c3c4a7a5c8a25fdf87152c1

View file

@ -0,0 +1,24 @@
$NetBSD: patch-lib_dbi.rb,v 1.1 2011/08/12 15:58:36 taca Exp $
* Don't use Deprecate since it would be conflict with newer rubygems.
--- lib/dbi.rb.orig 2011-08-09 05:56:50.000000000 +0000
+++ lib/dbi.rb
@@ -69,7 +69,7 @@ class Class
end
end
-Deprecate.set_action(
+Deprecated.set_action(
proc do |call|
klass, meth = call.split(/[#.]/)
klass = klass.split(/::/).inject(Module) { |a,x| a.const_get(x) }
@@ -83,7 +83,7 @@ Deprecate.set_action(
warn "ColumnInfo methods that do not match a component are deprecated and will eventually be removed"
end
- warn "You may change the result of calling deprecated code via Deprecate.set_action; Trace follows:"
+ warn "You may change the result of calling deprecated code via Deprecated.set_action; Trace follows:"
warn caller[2..-1].join("\n")
end
)

View file

@ -0,0 +1,15 @@
$NetBSD: patch-lib_dbi_columninfo.rb,v 1.1 2011/08/12 15:58:36 taca Exp $
* Create array of hash's key since hash would be modified in the block.
--- lib/dbi/columninfo.rb.orig 2011-08-09 05:56:50.000000000 +0000
+++ lib/dbi/columninfo.rb
@@ -39,7 +39,7 @@ module DBI
@hash ||= Hash.new
# coerce all strings to symbols
- @hash.each_key do |x|
+ @hash.keys.each do |x|
if x.kind_of? String
sym = x.to_sym
if @hash.has_key? sym