summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-21 14:47:54 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-21 14:47:54 +0000
commitcb1f9532b7440d08cf0fc31edccb3605e8f455f1 (patch)
tree6f1e9e05270dcbb19e81099398dde28d8f0d2b2c
parent868a02b6165bf4657e8c8729a90746eee60b5f02 (diff)
merges r23386 from trunk into ruby_1_9_1.
-- * ext/dl/lib/dl/func.rb (DL::Function#bound?): returns if already bound to a block. * ext/dl/lib/dl/value.rb (DL::ValueUtil#wrap_arg): block must be given if arg is not bound. [ruby-dev:38404] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--ext/dl/lib/dl/func.rb4
-rw-r--r--ext/dl/lib/dl/value.rb2
-rw-r--r--version.h2
4 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 774f26014..7e74a8937 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-Sun May 10 11:13:19 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Sun May 10 11:36:11 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/dl/cfunc.c (rb_dlcfunc_instance_p): new function to check if
the argument is an instance of DL::CFunc.
@@ -9,6 +9,12 @@ Sun May 10 11:13:19 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/dl/lib/dl/cparser.rb (DL::CParser#parse_signature): strips
spaces. based on a patch from Takashi Tamura in [ruby-dev:38398].
+ * ext/dl/lib/dl/value.rb (DL::ValueUtil#wrap_arg): block must be
+ given if arg is not bound. [ruby-dev:38404]
+
+ * ext/dl/cfunc.c (rb_dlcfunc_instance_p): new function to check if
+ the argument is an instance of DL::CFunc.
+
Sat May 9 11:14:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_eval.c (rb_f_catch): gets rid of issue with gcc 4.4. a patch
diff --git a/ext/dl/lib/dl/func.rb b/ext/dl/lib/dl/func.rb
index a2e6d40fb..f0e1ca71e 100644
--- a/ext/dl/lib/dl/func.rb
+++ b/ext/dl/lib/dl/func.rb
@@ -97,6 +97,10 @@ module DL
end
end
+ def bound?()
+ @cfunc.ptr != 0
+ end
+
def bind_at_call(&block)
bind(&block)
end
diff --git a/ext/dl/lib/dl/value.rb b/ext/dl/lib/dl/value.rb
index aa7e0dd32..254e1921c 100644
--- a/ext/dl/lib/dl/value.rb
+++ b/ext/dl/lib/dl/value.rb
@@ -61,6 +61,8 @@ module DL
if( block )
arg.bind_at_call(&block)
funcs.push(arg)
+ elsif !arg.bound?
+ raise(RuntimeError, "block must be given.")
end
return arg.to_i
when String
diff --git a/version.h b/version.h
index 949453f84..af7491e7d 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "1.9.1"
#define RUBY_RELEASE_DATE "2009-05-12"
-#define RUBY_PATCHLEVEL 136
+#define RUBY_PATCHLEVEL 137
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1