<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_refinement.rb, branch v2_0_0_rc1</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>* eval.c (Init_eval): enable Refinements by default.</title>
<updated>2013-01-07T11:22:31+00:00</updated>
<author>
<name>shugo</name>
<email>shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2013-01-07T11:22:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9cadf0c03906f49f41e4222248c6a48e72bdb82f'/>
<id>9cadf0c03906f49f41e4222248c6a48e72bdb82f</id>
<content type='text'>
  [ruby-core:51286] [Bug #7667]

* eval.c (rb_mod_refine, top_using): show a warning when
  Module#refine or main.using is called at the first time.

* ext/refinement/*: removed the extension library "refinement".

* test/ruby/test_refinement.rb: fix for the above changes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  [ruby-core:51286] [Bug #7667]

* eval.c (rb_mod_refine, top_using): show a warning when
  Module#refine or main.using is called at the first time.

* ext/refinement/*: removed the extension library "refinement".

* test/ruby/test_refinement.rb: fix for the above changes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* remove trailing spaces.</title>
<updated>2012-12-20T01:52:47+00:00</updated>
<author>
<name>nobu</name>
<email>nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2012-12-20T01:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=30fbc5591da5922f359987bbbb41de7ac6173ae8'/>
<id>30fbc5591da5922f359987bbbb41de7ac6173ae8</id>
<content type='text'>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* class.c (rb_prepend_module): move refined methods from the origin</title>
<updated>2012-12-12T09:35:50+00:00</updated>
<author>
<name>shugo</name>
<email>shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2012-12-12T09:35:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=75bed271f0719642f1866bdbbfa3c9940aad9abb'/>
<id>75bed271f0719642f1866bdbbfa3c9940aad9abb</id>
<content type='text'>
  of a class to the class, because refinements should have priority
  over prepended modules.

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  of a class to the class, because refinements should have priority
  over prepended modules.

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* eval.c (rb_using_refinement): make the method table of an iclass</title>
<updated>2012-12-11T16:48:21+00:00</updated>
<author>
<name>shugo</name>
<email>shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2012-12-11T16:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b5e9c6cb903aa550713f5f5764964560f98e180f'/>
<id>b5e9c6cb903aa550713f5f5764964560f98e180f</id>
<content type='text'>
  for a refinement that of the refinement, not that of the origin of
  the refinement, which is set by rb_include_class_new().  This
  change is needed to make module prepend into a refinement work
  properly.

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  for a refinement that of the refinement, not that of the origin of
  the refinement, which is set by rb_include_class_new().  This
  change is needed to make module prepend into a refinement work
  properly.

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* fix the behavior when a module is included into a refinement.</title>
<updated>2012-12-10T16:05:45+00:00</updated>
<author>
<name>shugo</name>
<email>shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2012-12-10T16:05:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7ef16d224a80a6e1e8c01b5b45ac7e2315a04e4c'/>
<id>7ef16d224a80a6e1e8c01b5b45ac7e2315a04e4c</id>
<content type='text'>
  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:
  &lt;Refinement2&gt; -&gt; &lt;RefinedClass&gt; -&gt; &lt;Refinement1&gt; -&gt; RefinedClass,
  where &lt;Module&gt; is an iclass for Module, so RefinedClass is
  searched before Refinement1.  The correct iclasses should be
  &lt;Refinement2&gt; -&gt; &lt;Refinement1&gt; -&gt; 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 -&gt; &lt;M&gt; -&gt; RefinedClass,
  and if refinements iclasses are &lt;Refinement2&gt; -&gt; &lt;M&gt;' -&gt;
  &lt;Refinement1&gt; -&gt; RefinedClass, then super in &lt;Refinement2&gt; should
  use Refinement2's superclass &lt;M&gt; instead of &lt;Refinement2&gt;'s
  superclass &lt;M&gt;'.

* 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  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:
  &lt;Refinement2&gt; -&gt; &lt;RefinedClass&gt; -&gt; &lt;Refinement1&gt; -&gt; RefinedClass,
  where &lt;Module&gt; is an iclass for Module, so RefinedClass is
  searched before Refinement1.  The correct iclasses should be
  &lt;Refinement2&gt; -&gt; &lt;Refinement1&gt; -&gt; 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 -&gt; &lt;M&gt; -&gt; RefinedClass,
  and if refinements iclasses are &lt;Refinement2&gt; -&gt; &lt;M&gt;' -&gt;
  &lt;Refinement1&gt; -&gt; RefinedClass, then super in &lt;Refinement2&gt; should
  use Refinement2's superclass &lt;M&gt; instead of &lt;Refinement2&gt;'s
  superclass &lt;M&gt;'.

* 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
</pre>
</div>
</content>
</entry>
<entry>
<title>* vm_method.c (rb_method_entry_without_refinements): use</title>
<updated>2012-12-10T13:02:54+00:00</updated>
<author>
<name>shugo</name>
<email>shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2012-12-10T13:02:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fa7c4ab4084ac6d5ad615d133ab0dcaca2c817fb'/>
<id>fa7c4ab4084ac6d5ad615d133ab0dcaca2c817fb</id>
<content type='text'>
  rb_resolve_refined_method() to search superclasses if
  me-&gt;def-&gt;orig_me is 0.  This change fixes make test-all
  TESTS="json ruby/test_refinement.rb".

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  rb_resolve_refined_method() to search superclasses if
  me-&gt;def-&gt;orig_me is 0.  This change fixes make test-all
  TESTS="json ruby/test_refinement.rb".

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* vm_insnhelper.c (vm_call_opt_send): Kernel#send should not use</title>
<updated>2012-12-09T08:48:34+00:00</updated>
<author>
<name>shugo</name>
<email>shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2012-12-09T08:48:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=29756c5e94c6f273c6b1a1103d9c0b12570566ea'/>
<id>29756c5e94c6f273c6b1a1103d9c0b12570566ea</id>
<content type='text'>
  refinements.

* proc.c (mnew): Kernel#method, Kernel#public_method,
  Module#instance_method, and Module#public_instance_method should
  not use refinements.

* vm_method.c (rb_method_boundp): Kernel#respond_to? should not use
  refinements.

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  refinements.

* proc.c (mnew): Kernel#method, Kernel#public_method,
  Module#instance_method, and Module#public_instance_method should
  not use refinements.

* vm_method.c (rb_method_boundp): Kernel#respond_to? should not use
  refinements.

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* eval.c: remove Module#refinements.</title>
<updated>2012-12-08T13:35:15+00:00</updated>
<author>
<name>shugo</name>
<email>shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2012-12-08T13:35:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4363d0765b802e0f8322fceeb282aa1c0d3f3e8b'/>
<id>4363d0765b802e0f8322fceeb282aa1c0d3f3e8b</id>
<content type='text'>
* test/ruby/test_refinement.rb: remove tests for Module#refinements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* test/ruby/test_refinement.rb: remove tests for Module#refinements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* eval.c (top_using): raise a RuntimeError if using is called in a</title>
<updated>2012-12-08T13:35:12+00:00</updated>
<author>
<name>shugo</name>
<email>shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2012-12-08T13:35:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bdb8607cb7549f8555fed781392231ead86d984b'/>
<id>bdb8607cb7549f8555fed781392231ead86d984b</id>
<content type='text'>
  module definition or a method definition.

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  module definition or a method definition.

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* vm_insnhelper.c (vm_search_normal_superclass): super in a</title>
<updated>2012-12-08T03:36:58+00:00</updated>
<author>
<name>shugo</name>
<email>shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2012-12-08T03:36:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ee68f78c2462908882e3394f8a91631ec4a45beb'/>
<id>ee68f78c2462908882e3394f8a91631ec4a45beb</id>
<content type='text'>
  refinement always uses the refined class as its superclass.

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  refinement always uses the refined class as its superclass.

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
</feed>
