mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	
				This change is a little tricky, so it might be better to prohibit
  module inclusion to refinements.
* include/ruby/ruby.h (RMODULE_INCLUDED_INTO_REFINEMENT): new flag
  to represent that a module (iclass) is included into a refinement.
* class.c (include_modules_at): set RMODULE_INCLUDED_INTO_REFINEMENT
  if klass is a refinement.
* eval.c (rb_mod_refine): set the superclass of a refinement to the
  refined class for super.
* eval.c (rb_using_refinement): skip the above superclass (the
  refined class) when creating iclasses for refinements.  Otherwise,
  `using Refinement1; using Refinement2' creates iclasses:
  <Refinement2> -> <RefinedClass> -> <Refinement1> -> RefinedClass,
  where <Module> is an iclass for Module, so RefinedClass is
  searched before Refinement1.  The correct iclasses should be
  <Refinement2> -> <Refinement1> -> RefinedClass.
* vm_insnhelper.c (vm_search_normal_superclass): if klass is an
  iclass for a refinement, use the refinement's superclass instead
  of the iclass's superclass.  Otherwise, multiple refinements are
  searched by super.  For example, if a refinement Refinement2
  includes a module M (i.e., Refinement2 -> <M> -> RefinedClass,
  and if refinements iclasses are <Refinement2> -> <M>' ->
  <Refinement1> -> RefinedClass, then super in <Refinement2> should
  use Refinement2's superclass <M> instead of <Refinement2>'s
  superclass <M>'.
* vm_insnhelper.c (vm_search_super_method): do not raise a
  NotImplementError if current_defind_class is a module included
  into a refinement.  Because of the change of
  vm_search_normal_superclass(), the receiver might not be an
  instance of the module('s iclass).
* test/ruby/test_refinement.rb: related test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
		
	
					 | 
			||
|---|---|---|
| .. | ||
| -ext- | ||
| base64 | ||
| benchmark | ||
| bigdecimal | ||
| cgi | ||
| coverage | ||
| csv | ||
| date | ||
| dbm | ||
| digest | ||
| dl | ||
| drb | ||
| dtrace | ||
| erb | ||
| etc | ||
| fiddle | ||
| fileutils | ||
| gdbm | ||
| io | ||
| irb | ||
| json | ||
| logger | ||
| matrix | ||
| minitest | ||
| misc | ||
| mkmf | ||
| monitor | ||
| net | ||
| nkf | ||
| objspace | ||
| open-uri | ||
| openssl | ||
| optparse | ||
| ostruct | ||
| pathname | ||
| psych | ||
| rake | ||
| rdoc | ||
| readline | ||
| resolv | ||
| rexml | ||
| rinda | ||
| ripper | ||
| rss | ||
| ruby | ||
| rubygems | ||
| scanf | ||
| sdbm | ||
| socket | ||
| stringio | ||
| strscan | ||
| syslog | ||
| testunit | ||
| thread | ||
| uri | ||
| webrick | ||
| win32ole | ||
| xmlrpc | ||
| zlib | ||
| inlinetest.rb | ||
| profile_test_all.rb | ||
| runner.rb | ||
| test_abbrev.rb | ||
| test_cmath.rb | ||
| test_curses.rb | ||
| test_delegate.rb | ||
| test_find.rb | ||
| test_ipaddr.rb | ||
| test_mathn.rb | ||
| test_mutex_m.rb | ||
| test_open3.rb | ||
| test_pp.rb | ||
| test_prettyprint.rb | ||
| test_prime.rb | ||
| test_pstore.rb | ||
| test_pty.rb | ||
| test_securerandom.rb | ||
| test_set.rb | ||
| test_shellwords.rb | ||
| test_singleton.rb | ||
| test_syslog.rb | ||
| test_tempfile.rb | ||
| test_time.rb | ||
| test_timeout.rb | ||
| test_tmpdir.rb | ||
| test_tracer.rb | ||
| test_tsort.rb | ||
| test_weakref.rb | ||
| with_different_ofs.rb | ||