<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/ruby/test_case.rb, branch v4.0.3</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Prevent a warning (retry)</title>
<updated>2024-09-18T02:16:22+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2024-09-18T02:16:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4797b0704ae49fb42c8ad9a45028efbe2298b5f5'/>
<id>4797b0704ae49fb42c8ad9a45028efbe2298b5f5</id>
<content type='text'>
```
test/ruby/test_case.rb:75: warning: 'when' clause on line 75 duplicates 'when' clause on line 75 and is ignored
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
```
test/ruby/test_case.rb:75: warning: 'when' clause on line 75 duplicates 'when' clause on line 75 and is ignored
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Prevent two warnings</title>
<updated>2024-09-17T13:52:25+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2024-09-17T13:32:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fd5e583990330f2d84d05d1ae1ceea2a472b6352'/>
<id>fd5e583990330f2d84d05d1ae1ceea2a472b6352</id>
<content type='text'>
```
/home/chkbuild/chkbuild/tmp/build/20240917T123003Z/ruby/test/ruby/test_case.rb:73: warning: 'when' clause on line 73 duplicates 'when' clause on line 73 and is ignored
/home/chkbuild/chkbuild/tmp/build/20240917T123003Z/ruby/test/ruby/test_syntax.rb:333: warning: key :k1 is duplicated and overwritten on line 333
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
```
/home/chkbuild/chkbuild/tmp/build/20240917T123003Z/ruby/test/ruby/test_case.rb:73: warning: 'when' clause on line 73 duplicates 'when' clause on line 73 and is ignored
/home/chkbuild/chkbuild/tmp/build/20240917T123003Z/ruby/test/ruby/test_syntax.rb:333: warning: key :k1 is duplicated and overwritten on line 333
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid improper optimization of case statements mixed integer/rational/complex</title>
<updated>2021-05-13T02:30:05+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2021-05-12T22:06:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9ce29c94d82c6bf278b1be088435726a9c47e225'/>
<id>9ce29c94d82c6bf278b1be088435726a9c47e225</id>
<content type='text'>
Fixes [Bug #17857]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes [Bug #17857]
</pre>
</div>
</content>
</entry>
<entry>
<title>Use Integer instead of Fixnum and Bignum.</title>
<updated>2016-05-17T13:15:57+00:00</updated>
<author>
<name>akr</name>
<email>akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2016-05-17T13:15:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=449fbfd4d4ce47be227804c22214fed32a5b0124'/>
<id>449fbfd4d4ce47be227804c22214fed32a5b0124</id>
<content type='text'>
* object.c, numeric.c, enum.c, ext/-test-/bignum/mul.c,
  lib/rexml/quickpath.rb, lib/rexml/text.rb, lib/rexml/xpath_parser.rb,
  lib/rubygems/specification.rb, lib/uri/generic.rb,
  bootstraptest/test_eval.rb, basictest/test.rb,
  test/-ext-/bignum/test_big2str.rb, test/-ext-/bignum/test_div.rb,
  test/-ext-/bignum/test_mul.rb, test/-ext-/bignum/test_str2big.rb,
  test/csv/test_data_converters.rb, test/date/test_date.rb,
  test/json/test_json_generate.rb, test/minitest/test_minitest_mock.rb,
  test/openssl/test_cipher.rb, test/rexml/test_jaxen.rb,
  test/ruby/test_array.rb, test/ruby/test_basicinstructions.rb,
  test/ruby/test_bignum.rb, test/ruby/test_case.rb,
  test/ruby/test_class.rb, test/ruby/test_complex.rb,
  test/ruby/test_enum.rb, test/ruby/test_eval.rb,
  test/ruby/test_iseq.rb, test/ruby/test_literal.rb,
  test/ruby/test_math.rb, test/ruby/test_module.rb,
  test/ruby/test_numeric.rb, test/ruby/test_range.rb,
  test/ruby/test_rational.rb, test/ruby/test_refinement.rb,
  test/ruby/test_rubyvm.rb, test/ruby/test_struct.rb,
  test/ruby/test_variable.rb, test/rubygems/test_gem_specification.rb,
  test/thread/test_queue.rb: Use Integer instead of Fixnum and Bignum.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* object.c, numeric.c, enum.c, ext/-test-/bignum/mul.c,
  lib/rexml/quickpath.rb, lib/rexml/text.rb, lib/rexml/xpath_parser.rb,
  lib/rubygems/specification.rb, lib/uri/generic.rb,
  bootstraptest/test_eval.rb, basictest/test.rb,
  test/-ext-/bignum/test_big2str.rb, test/-ext-/bignum/test_div.rb,
  test/-ext-/bignum/test_mul.rb, test/-ext-/bignum/test_str2big.rb,
  test/csv/test_data_converters.rb, test/date/test_date.rb,
  test/json/test_json_generate.rb, test/minitest/test_minitest_mock.rb,
  test/openssl/test_cipher.rb, test/rexml/test_jaxen.rb,
  test/ruby/test_array.rb, test/ruby/test_basicinstructions.rb,
  test/ruby/test_bignum.rb, test/ruby/test_case.rb,
  test/ruby/test_class.rb, test/ruby/test_complex.rb,
  test/ruby/test_enum.rb, test/ruby/test_eval.rb,
  test/ruby/test_iseq.rb, test/ruby/test_literal.rb,
  test/ruby/test_math.rb, test/ruby/test_module.rb,
  test/ruby/test_numeric.rb, test/ruby/test_range.rb,
  test/ruby/test_rational.rb, test/ruby/test_refinement.rb,
  test/ruby/test_rubyvm.rb, test/ruby/test_struct.rb,
  test/ruby/test_variable.rb, test/rubygems/test_gem_specification.rb,
  test/thread/test_queue.rb: Use Integer instead of Fixnum and Bignum.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>Add frozen_string_literal: false for all files</title>
<updated>2015-12-16T05:07:31+00:00</updated>
<author>
<name>naruse</name>
<email>naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-12-16T05:07:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3e92b635fb5422207b7bbdc924e292e51e21f040'/>
<id>3e92b635fb5422207b7bbdc924e292e51e21f040</id>
<content type='text'>
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>compile optimized case dispatch for nil/true/false</title>
<updated>2015-12-08T01:46:45+00:00</updated>
<author>
<name>normal</name>
<email>normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2015-12-08T01:46:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4ebab10bf5ac061bd71df8db2fd7fea61be658c0'/>
<id>4ebab10bf5ac061bd71df8db2fd7fea61be658c0</id>
<content type='text'>
nil/true/false are special literals just like floats, integers,
literal strings, and symbols.  Optimize when statements with
them by using a jump table, too.

target 0: a (ruby 2.3.0dev (2015-12-08 trunk 52928) [x86_64-linux]) at "/home/ew/rrrr/b/ruby"
target 1: b (ruby 2.3.0dev (2015-12-08 master 52928) [x86_64-linux]) at "/home/ew/ruby/b/ruby"

benchmark results:
minimum results in each 5 measurements.
Execution time (sec)
name	a	b
loop_whileloop2	0.102	0.103
vm2_case_lit*	1.657	0.549

Speedup ratio: compare with the result of `a' (greater is better)
name	b
loop_whileloop2	0.988
vm2_case_lit*	3.017

* benchmark/bm_vm2_case_lit.rb: new benchmark
* compile.c (case_when_optimizable_literal): add nil/true/false
* insns.def (opt_case_dispatch): ditto
* vm.c (vm_redefinition_check_flag): ditto
* vm.c (vm_init_redefined_flag): ditto
* vm_core.h: ditto
* object.c (InitVM_Object): define === explicitly for nil/true/false
* test/ruby/test_case.rb (test_deoptimize_nil): new test
* test/ruby/test_optimization.rb (test_opt_case_dispatch): update
  (test_eqq): new test
  [ruby-core:71923] [Feature #11769]
  Original patch by Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
nil/true/false are special literals just like floats, integers,
literal strings, and symbols.  Optimize when statements with
them by using a jump table, too.

target 0: a (ruby 2.3.0dev (2015-12-08 trunk 52928) [x86_64-linux]) at "/home/ew/rrrr/b/ruby"
target 1: b (ruby 2.3.0dev (2015-12-08 master 52928) [x86_64-linux]) at "/home/ew/ruby/b/ruby"

benchmark results:
minimum results in each 5 measurements.
Execution time (sec)
name	a	b
loop_whileloop2	0.102	0.103
vm2_case_lit*	1.657	0.549

Speedup ratio: compare with the result of `a' (greater is better)
name	b
loop_whileloop2	0.988
vm2_case_lit*	3.017

* benchmark/bm_vm2_case_lit.rb: new benchmark
* compile.c (case_when_optimizable_literal): add nil/true/false
* insns.def (opt_case_dispatch): ditto
* vm.c (vm_redefinition_check_flag): ditto
* vm.c (vm_init_redefined_flag): ditto
* vm_core.h: ditto
* object.c (InitVM_Object): define === explicitly for nil/true/false
* test/ruby/test_case.rb (test_deoptimize_nil): new test
* test/ruby/test_optimization.rb (test_opt_case_dispatch): update
  (test_eqq): new test
  [ruby-core:71923] [Feature #11769]
  Original patch by Aaron Patterson &lt;tenderlove@ruby-lang.org&gt;

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* test/lib/envutil.rb: Moved from test/ruby/.</title>
<updated>2014-11-13T16:05:37+00:00</updated>
<author>
<name>akr</name>
<email>akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2014-11-13T16:05:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fb2008a73a46066481b77f53c62de8630a153efe'/>
<id>fb2008a73a46066481b77f53c62de8630a153efe</id>
<content type='text'>
* test/lib/find_executable.rb: Ditto.

* test/lib/memory_status.rb: Ditto.

* test/lib/test/unit.rb: require envutil.

* test/: Don't require envutil in test files.



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

* test/lib/memory_status.rb: Ditto.

* test/lib/test/unit.rb: require envutil.

* test/: Don't require envutil in test files.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* test/ruby/test_case.rb (test_nomethoderror):</title>
<updated>2013-12-01T17:06:56+00:00</updated>
<author>
<name>sorah</name>
<email>sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2013-12-01T17:06:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=46e44fb6289bf829331d9e35fc1d3084443b5bcf'/>
<id>46e44fb6289bf829331d9e35fc1d3084443b5bcf</id>
<content type='text'>
  Add test related to r43913, r43914

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Add test related to r43913, r43914

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* test/ruby/test_case.rb (test_method_missing): Test for r43913.</title>
<updated>2013-11-29T09:08:33+00:00</updated>
<author>
<name>sorah</name>
<email>sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2013-11-29T09:08:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=14361a72ff538f2b0a8833ecbef01c3ec7f19c48'/>
<id>14361a72ff538f2b0a8833ecbef01c3ec7f19c48</id>
<content type='text'>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43914 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@43914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</pre>
</div>
</content>
</entry>
<entry>
<title>* compile.c (case_when_optimizable_literal): When float value can be</title>
<updated>2010-09-09T13:40:14+00:00</updated>
<author>
<name>wanabe</name>
<email>wanabe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e</email>
</author>
<published>2010-09-09T13:40:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=96688ecbab2e18be02af7172bcb3732e57d9290e'/>
<id>96688ecbab2e18be02af7172bcb3732e57d9290e</id>
<content type='text'>
  treated as integer, add to table hash of case that way.
  based on a patch from Ikuo KOBORI. [ruby-dev:42038]

* insnf.def (opt_case_dispatch): ditto.

* test/ruby/test_case.rb: add tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  treated as integer, add to table hash of case that way.
  based on a patch from Ikuo KOBORI. [ruby-dev:42038]

* insnf.def (opt_case_dispatch): ditto.

* test/ruby/test_case.rb: add tests.

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