summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ext/dl/mkcallback.rb3
-rw-r--r--version.h8
3 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b53f3e7f15..ecb4fa92d45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sun Mar 11 17:45:51 2007 Akinori MUSHA <knu@iDaemons.org>
+
+ * ext/dl/mkcallback.rb (mkfunc): Make sure that a callback
+ function is found in the function table before trying to call
+ it; submitted by sheepman <sheepman AT sheepman.sakura.ne.jp>
+ in [ruby-dev:30524].
+
Tue Mar 6 18:58:37 2007 Keiju Ishitsuka <keiju@ruby-lang.org>
* lib/shell/process-controller.rb: fix thread synchronization
diff --git a/ext/dl/mkcallback.rb b/ext/dl/mkcallback.rb
index b7ea1718d0a..c9f92e4a0de 100644
--- a/ext/dl/mkcallback.rb
+++ b/ext/dl/mkcallback.rb
@@ -31,6 +31,9 @@ def mkfunc(rettype, fnum, argc)
subst_code,
"",
" obj = rb_hash_aref(DLFuncTable, rb_assoc_new(INT2NUM(#{rettype.to_s}),INT2NUM(#{fnum.to_s})));",
+ " if(NIL_P(obj))",
+ " rb_raise(rb_eDLError, \"callback function does not exist in DL::FuncTable\");",
+ " Check_Type(obj, T_ARRAY);",
" proto = rb_ary_entry(obj, 0);",
" proc = rb_ary_entry(obj, 1);",
" Check_Type(proto, T_STRING);",
diff --git a/version.h b/version.h
index 9f72a1d912c..3815fece416 100644
--- a/version.h
+++ b/version.h
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.5"
-#define RUBY_RELEASE_DATE "2007-03-08"
+#define RUBY_RELEASE_DATE "2007-03-12"
#define RUBY_VERSION_CODE 185
-#define RUBY_RELEASE_CODE 20070308
-#define RUBY_PATCHLEVEL 29
+#define RUBY_RELEASE_CODE 20070312
+#define RUBY_PATCHLEVEL 30
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 5
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 3
-#define RUBY_RELEASE_DAY 8
+#define RUBY_RELEASE_DAY 12
RUBY_EXTERN const char ruby_version[];
RUBY_EXTERN const char ruby_release_date[];