ruby-changes:11861
From: yugui <ko1@a...>
Date: Fri, 22 May 2009 00:05:23 +0900 (JST)
Subject: [ruby-changes:11861] Ruby:r23519 (ruby_1_9_1): merges r23386 from trunk into ruby_1_9_1.
yugui 2009-05-21 23:47:54 +0900 (Thu, 21 May 2009) New Revision: 23519 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23519 Log: 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] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/ext/dl/lib/dl/func.rb branches/ruby_1_9_1/ext/dl/lib/dl/value.rb branches/ruby_1_9_1/version.h Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 23518) +++ ruby_1_9_1/ChangeLog (revision 23519) @@ -1,4 +1,4 @@ -Sun May 10 11:13:19 2009 Nobuyoshi Nakada <nobu@r...> +Sun May 10 11:36:11 2009 Nobuyoshi Nakada <nobu@r...> * 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 @@ * 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@r...> * vm_eval.c (rb_f_catch): gets rid of issue with gcc 4.4. a patch Index: ruby_1_9_1/ext/dl/lib/dl/func.rb =================================================================== --- ruby_1_9_1/ext/dl/lib/dl/func.rb (revision 23518) +++ ruby_1_9_1/ext/dl/lib/dl/func.rb (revision 23519) @@ -97,6 +97,10 @@ end end + def bound?() + @cfunc.ptr != 0 + end + def bind_at_call(&block) bind(&block) end Index: ruby_1_9_1/ext/dl/lib/dl/value.rb =================================================================== --- ruby_1_9_1/ext/dl/lib/dl/value.rb (revision 23518) +++ ruby_1_9_1/ext/dl/lib/dl/value.rb (revision 23519) @@ -61,6 +61,8 @@ 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 Index: ruby_1_9_1/version.h =================================================================== --- ruby_1_9_1/version.h (revision 23518) +++ ruby_1_9_1/version.h (revision 23519) @@ -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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/