summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-04 18:29:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-04 18:29:55 +0000
commita58e3d763b6429df710c2f3a6dd38e7339ec581e (patch)
tree818b12fe58c2e072fd79c3d6ca057e4f88d25518 /include/ruby
parente3707541890c1d679b8bc8e319980667e6ed2bd6 (diff)
* array.c (rb_ary_sort_bang): respect overridden <=> for String and
Fixnum. [ruby-core:17708] * include/ruby/node.h (NOEX_BASIC): basic definition method flag. * include/ruby/intern.h, vm_method.c (rb_method_basic_definition_p): new function to check if the method is not redefined after the initialization. * vm_method.c (rb_obj_respond_to): use rb_method_basic_definition_p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/intern.h1
-rw-r--r--include/ruby/node.h5
2 files changed, 4 insertions, 2 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index b84ed3c8f4..243e7015a0 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -250,6 +250,7 @@ void rb_clear_cache_by_class(VALUE);
void rb_alias(VALUE, ID, ID);
void rb_attr(VALUE,ID,int,int,int);
int rb_method_boundp(VALUE, ID, int);
+int rb_method_basic_definition_p(VALUE, ID);
VALUE rb_eval_cmd(VALUE, VALUE, int);
int rb_obj_respond_to(VALUE, ID, int);
int rb_respond_to(VALUE, ID);
diff --git a/include/ruby/node.h b/include/ruby/node.h
index 5272b0e685..d83f55098c 100644
--- a/include/ruby/node.h
+++ b/include/ruby/node.h
@@ -463,7 +463,8 @@ typedef struct RNode {
#define NOEX_NOSUPER 0x01
#define NOEX_PRIVATE 0x02
#define NOEX_PROTECTED 0x04
-#define NOEX_MASK 0x06 /* 1110 */
+#define NOEX_MASK 0x06 /* 0110 */
+#define NOEX_BASIC 0x08
#define NOEX_UNDEF NOEX_NOSUPER
@@ -472,7 +473,7 @@ typedef struct RNode {
#define NOEX_VCALL 0x40
#define NOEX_SAFE(n) (((n) >> 8) & 0x0F)
-#define NOEX_WITH(n, s) ((s << 8) | n)
+#define NOEX_WITH(n, s) ((s << 8) | (n) | (ruby_running ? 0 : NOEX_BASIC))
#define NOEX_WITH_SAFE(n) NOEX_WITH(n, rb_safe_level())
#define CALL_PUBLIC 0