diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-03-27 07:10:58 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-03-27 07:10:58 +0000 |
commit | b60a365763c4abce061a49c2e68b1105f81fe598 (patch) | |
tree | 48db04333ba63f89121ba05c2bcdc3e765af5343 /eval.c | |
parent | 2559f0d90ddf45f6cbaadc69a7a2fd7a3bfbf8a0 (diff) |
* eval.c (rb_mod_define_method): should have clear method cache.
* eval.c (rb_mod_define_method): should have raised exception for
type error.
* ruby.h: changed "extern INLINE" to "static inline".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -6730,6 +6730,7 @@ rb_mod_define_method(argc, argv, mod) } if (TYPE(body) != T_DATA) { /* type error */ + rb_raise(rb_eTypeError, "wrong argument type (expected Proc)"); } if (RDATA(body)->dmark == (RUBY_DATA_FUNC)bm_mark) { rb_add_method(mod, id, NEW_DMETHOD(method_unbind(body)), NOEX_PUBLIC); @@ -6739,8 +6740,10 @@ rb_mod_define_method(argc, argv, mod) } else { /* type error */ + rb_raise(rb_eTypeError, "wrong argument type (expected Proc)"); } + rb_clear_cache_by_id(id); return body; } |