Created
September 28, 2012 09:14
-
-
Save shugo/3798814 to your computer and use it in GitHub Desktop.
refinement performance improvement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/vm_method.c b/vm_method.c | |
index e44782c..bf02c2c 100644 | |
--- a/vm_method.c | |
+++ b/vm_method.c | |
@@ -407,8 +407,10 @@ search_method(VALUE klass, ID id, VALUE omod, VALUE *defined_class_ptr) | |
iclass = rb_hash_lookup(omod, klass); | |
if (NIL_P(iclass) && BUILTIN_TYPE(klass) == T_ICLASS) { | |
iclass = rb_hash_lookup(omod, RBASIC(klass)->klass); | |
- if (!NIL_P(iclass)) | |
+ if (!NIL_P(iclass)) { | |
iclass = copy_refinement_iclass(iclass, klass); | |
+ rb_hash_aset(omod, klass, iclass); | |
+ } | |
} | |
if (!NIL_P(iclass)) { | |
skipped_class = klass; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment