Commit 2ad5e38639b10a9688c26f2b4c661cd3c5c862e3
- Date: Thu May 01 02:47:55 +0000 2008
- Committer: Yurii Rashkovskii (yrashk@gmail.com)
- Author: Yurii Rashkovskii (yrashk@gmail.com)
- Commit SHA1: 2ad5e38639b10a9688c26f2b4c661cd3c5c862e3
- Tree SHA1: 18b6d206ff612d52a14f38545ad5bb346bf3d553
bugfix backport from rbmodexcl
Commit diff
| |   |
| 23 | 23 | if (mod == rb_mKernel) |
| 24 | 24 | rb_raise(rb_eArgError, "unextending Kernel is prohibited"); |
| 25 | 25 | |
| 26 | | p = (TYPE(self) == T_CLASS) ? self : rb_singleton_class(self); |
| 26 | p = rb_singleton_class(self); |
| 27 | 27 | |
| 28 | 28 | while (p) { |
| 29 | 29 | if (p == mod || RCLASS(p)->m_tbl == RCLASS(mod)->m_tbl) { |
| toggle raw diff |
--- a/lib/strokedb/core_ext/object.rb
+++ b/lib/strokedb/core_ext/object.rb
@@ -23,7 +23,7 @@ class Object
if (mod == rb_mKernel)
rb_raise(rb_eArgError, "unextending Kernel is prohibited");
- p = (TYPE(self) == T_CLASS) ? self : rb_singleton_class(self);
+ p = rb_singleton_class(self);
while (p) {
if (p == mod || RCLASS(p)->m_tbl == RCLASS(mod)->m_tbl) { |