summaryrefslogtreecommitdiff
path: root/test/ruby/test_case.rb
AgeCommit message (Collapse)Author
2015-12-16Add frozen_string_literal: false for all filesnaruse
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
2015-12-08compile optimized case dispatch for nil/true/falsenormal
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 <tenderlove@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* 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
2013-12-01* test/ruby/test_case.rb (test_nomethoderror):sorah
Add test related to r43913, r43914 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29* test/ruby/test_case.rb (test_method_missing): Test for r43913.sorah
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-09* compile.c (case_when_optimizable_literal): When float value can bewanabe
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
2010-04-17* compile.c (iseq_compile_each): fix splat condition in NODE_WHEN.wanabe
[Bug #2226] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-02use require_relative.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25* lib/matrix.rb: suppress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-05* test/ruby/test_case.rb: merged r25658 from ruby_1_8.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-13* test/ruby/test_case.rb (TestCase#test_deoptimization):yugui
test for [ruby-core:23190]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-18 * test/*: should not depend on $KCODE.nahi
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-30* io.c (READ_DATA_BUFFERED): new macro to detect whether stdiomatz
buffer filled. * io.c (rb_io_fptr_cleanup): move path deallocation to rb_io_fptr_finalize (finalizer called by GC). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05* lib/optparse.rb (OptionParser#order, #permute, #parse): allow annobu
array as argument. * test/ruby/test_*.rb: moved invariants to left side in assert_equal, and use assert_nil, assert_raises and so on. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-04* test/ruby: tests for ruby itself.nahi
* test/ruby/test_*.rb: split sample/test.rb into 28 test/unit testcases. some tests could not be translates... search '!!' mark to see it. * test/csv/test_csv.rb: should require 'csv', not '../lib/csv'. test runner should set load path correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e