1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* vm_method.c: typo fix [fix GH-993][ci skip] Patch by @0x0dea

* test/ruby/test_refinement.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2015-08-11 01:33:32 +00:00
parent 3c402604db
commit 0e8d7f89e6
3 changed files with 14 additions and 9 deletions

View file

@ -1,3 +1,8 @@
Tue Aug 11 10:33:26 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
* vm_method.c: typo fix [fix GH-993][ci skip] Patch by @0x0dea
* test/ruby/test_refinement.rb: ditto.
Sun Aug 9 14:15:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> Sun Aug 9 14:15:54 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm.c (Init_vm_objects, rb_vm_fstring_table): use frozen_strings * vm.c (Init_vm_objects, rb_vm_fstring_table): use frozen_strings

View file

@ -1467,7 +1467,7 @@ class TestRefinement < Test::Unit::TestCase
module M module M
refine C do refine C do
def foo def foo
puts "Refiend C" puts "Refined C"
end end
end end
end end

View file

@ -783,7 +783,7 @@ rb_callable_method_entry(VALUE klass, ID id)
static const rb_method_entry_t *resolve_refined_method(VALUE refinements, const rb_method_entry_t *me, VALUE *defined_class_ptr); static const rb_method_entry_t *resolve_refined_method(VALUE refinements, const rb_method_entry_t *me, VALUE *defined_class_ptr);
static const rb_method_entry_t * static const rb_method_entry_t *
method_entry_resolve_refienment(VALUE klass, ID id, int with_refinement, VALUE *defined_class_ptr) method_entry_resolve_refinement(VALUE klass, ID id, int with_refinement, VALUE *defined_class_ptr)
{ {
const rb_method_entry_t *me = method_entry_get(klass, id, defined_class_ptr); const rb_method_entry_t *me = method_entry_get(klass, id, defined_class_ptr);
@ -808,33 +808,33 @@ method_entry_resolve_refienment(VALUE klass, ID id, int with_refinement, VALUE *
const rb_method_entry_t * const rb_method_entry_t *
rb_method_entry_with_refinements(VALUE klass, ID id) rb_method_entry_with_refinements(VALUE klass, ID id)
{ {
return method_entry_resolve_refienment(klass, id, TRUE, NULL); return method_entry_resolve_refinement(klass, id, TRUE, NULL);
} }
const rb_callable_method_entry_t * const rb_callable_method_entry_t *
rb_callable_method_entry_with_refinements(VALUE klass, ID id) rb_callable_method_entry_with_refinements(VALUE klass, ID id)
{ {
VALUE defined_class; VALUE defined_class;
const rb_method_entry_t *me = method_entry_resolve_refienment(klass, id, TRUE, &defined_class); const rb_method_entry_t *me = method_entry_resolve_refinement(klass, id, TRUE, &defined_class);
return prepare_callable_method_entry(defined_class, id, me); return prepare_callable_method_entry(defined_class, id, me);
} }
const rb_method_entry_t * const rb_method_entry_t *
rb_method_entry_without_refinements(VALUE klass, ID id) rb_method_entry_without_refinements(VALUE klass, ID id)
{ {
return method_entry_resolve_refienment(klass, id, FALSE, NULL); return method_entry_resolve_refinement(klass, id, FALSE, NULL);
} }
const rb_callable_method_entry_t * const rb_callable_method_entry_t *
rb_callable_method_entry_without_refinements(VALUE klass, ID id) rb_callable_method_entry_without_refinements(VALUE klass, ID id)
{ {
VALUE defined_class; VALUE defined_class;
const rb_method_entry_t *me = method_entry_resolve_refienment(klass, id, FALSE, &defined_class); const rb_method_entry_t *me = method_entry_resolve_refinement(klass, id, FALSE, &defined_class);
return prepare_callable_method_entry(defined_class, id, me); return prepare_callable_method_entry(defined_class, id, me);
} }
static const rb_method_entry_t * static const rb_method_entry_t *
refiend_method_original_method_entry(VALUE refinements, const rb_method_entry_t *me, VALUE *defined_class_ptr) refined_method_original_method_entry(VALUE refinements, const rb_method_entry_t *me, VALUE *defined_class_ptr)
{ {
VALUE super; VALUE super;
@ -861,7 +861,7 @@ resolve_refined_method(VALUE refinements, const rb_method_entry_t *me, VALUE *de
refinement = find_refinement(refinements, me->owner); refinement = find_refinement(refinements, me->owner);
if (NIL_P(refinement)) { if (NIL_P(refinement)) {
return refiend_method_original_method_entry(refinements, me, defined_class_ptr); return refined_method_original_method_entry(refinements, me, defined_class_ptr);
} }
else { else {
tmp_me = method_entry_get(refinement, me->called_id, defined_class_ptr); tmp_me = method_entry_get(refinement, me->called_id, defined_class_ptr);
@ -870,7 +870,7 @@ resolve_refined_method(VALUE refinements, const rb_method_entry_t *me, VALUE *de
return tmp_me; return tmp_me;
} }
else { else {
return refiend_method_original_method_entry(refinements, me, defined_class_ptr); return refined_method_original_method_entry(refinements, me, defined_class_ptr);
} }
} }
} }