summaryrefslogtreecommitdiff
path: root/ChangeLog
AgeCommit message (Collapse)Author
2015-12-08* test/io/console/test_io_console.rb (test_getpass): s.getpassngoto
should be tested. Narrow ensure block. This reverts r52911. [Bug #11780] [ruby-dev:49412] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52937 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
2015-12-08optparse.rb: Fix typo [ci skip]nobu
* lib/optparse.rb: fix double word typo in the document. [Misc #10608] [Fix GH-1126] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-08date_core.c: missing argument checknobu
* ext/date/date_core.c (d_lite_lshift): should check the argument before negation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07insns.def (opt_case_dispatch): check Float#=== redefinitionnormal
The missing check for Float#=== redefinition was noticed while working on enhancing optimized case dispatch for nil/true/false in [ruby-core:71818] https://bugs.ruby-lang.org/issues/11769 So no, I don't normally redefine core classes like this :P * insns.def (opt_case_dispatch): check Float#=== redefinition * test/ruby/test_optimization.rb (test_opt_case_dispatch): new [ruby-core:71920] [Bug #11784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* test/lib/iseq_loader_checker.rb: add iseq dumper/loader checker.ko1
If you enable this checker (remove `#' in test/runner.rb), you can see comparison results between an original iseq disassembed result and dumped and loaded iseq disassembed result. There are several bugs around there, because of inexact stack depth calculation. Now, I leave these bugs because they are not critical and difficult to solve completely. * test/runner.rb: require test/lib/iseq_loader_checker.rb but disabled at default (commented out). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07doc/extension.rdoc: warn about kwargs performance in C [ci skip]normal
This existing API seems doomed performance-wise, and writing things in Ruby is nicer anyways. So discourage folks from using it. [Feature #11339] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* iseq.c (iseq_load): disable peephole optimization optionko1
because apply it multiple times change the sequence. (iseq != peephole_optimize(load(iseq.to_a))) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* compile.c (rb_iseq_build_from_ary): do not allocate tableko1
if table_size is 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07socket: expand docs+tests for recv_io/send_ionormal
* ext/socket/unixsocket.c (unix_send_io): document args (unix_recv_io): ditto * test/socket/test_unix.rb (test_fd_passing_class_mode): added I was working on these when I encountered the problem in with BasicSocket.for_fd not handling mode args: https://bugs.ruby-lang.org/issues/11778 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* iseq.c (iseq_translate): at the end of constructing an iseq,ko1
call RubyVM::InstructionSequence.translate(iseq) if this method is defined. If the return value is also an object of RubyVM::InstructionSequence, then use it instead of created one. For example, this method is useful to test iseq dumper/loader such as RubyVM::InstructionSequence#to_a and rb_iseq_load(). Because this method is for such internal experimental usage, the interface is not matured. For example, this interface has no extensibility. Two or more translaters can not run simultaneously. So that we don't guarantee future compatibility of this method. Basically, do not use this method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* ext/psych/*: update psych to 2.0.16tenderlove
* test/psych/*: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07* string.c: introduce String#+@ and String#-@ to controlko1
String mutability. [Feature #11782] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07parse.y: indented hereocnobu
* parse.y: add heredoc <<~ syntax. [Feature #9098] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07add missing options to call-seq of IO#read_nonblockkazu
* prelude.rb (IO#read_nonblock): [DOC] add missing options to call-seq. [ruby-core:71627] [Bug #11730] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-07.gitignore: added cygwin*.def for Cygwinduerst
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06introduce rb_autoload_str to replace rb_autoloadnormal
rb_autoload_str may be safer by preventing premature GC. It can also be more efficient by passing a pre-frozen string that can be deduped using rb_fstring. Common autoload callers (e.g. rubygems, rdoc) already use string literals as the file argument. There seems to be no reason to expose rb_autoload_str to the public C API since autoload is not performance-critical. Applications may declare autoloads in Ruby code or via rb_funcall; so merely deprecate rb_autoload without exposing rb_autoload_str to new users. Running: valgrind -v ruby -rrdoc -rubygems -e exit shows a minor memory reduction (32-bit userspace) before: in use at exit: 1,600,621 bytes in 28,819 blocks total heap usage: 55,786 allocs, 26,967 frees, 6,693,790 bytes allocated after: in use at exit: 1,599,778 bytes in 28,789 blocks total heap usage: 55,739 allocs, 26,950 frees, 6,692,973 bytes allocated * include/ruby/intern.h (rb_autoload): deprecate * internal.h (rb_autoload_str): declare * load.c (rb_mod_autoload): use rb_autoload_str * variable.c (rb_autoload): become compatibility wrapper (rb_autoload_str): hoisted out from old rb_autoload [ruby-core:71369] [Feature #11664] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06* configure.in: add missing x.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06* test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): gave up the testusa
of binary path info test on Windows because the test had passed occasionally as the comment said. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-06console.c: console_getpassnobu
* ext/io/console/console.c (console_getpass): add IO#getpass method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-05* ext/json/json.gemspec: bump version to json 1.8.3. CRuby already containedhsbt
upstream changes. https://github.com/ruby/ruby/commit/4d059bf9f5f10f3d3088de49fc87e5555db7770d https://github.com/flori/json/commit/d4c99de78905d96c3f301f48b2c789943bb3f098 * ext/json/lib/json/version.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-05Fix cross buildnobu
* tool/fake.rb: Fix cross build when srcdir is an absolute path. * Makefile.in: PREP dependency is needed when cross build too, not "-r$(arch)-fake" to be used before created. [Fix GH-1125] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-05hash.c: env encoding fallback on Windowsnobu
* hash.c (env_str_new, env_path_str_new): make default string UTF-8 for the case conversion is not possible. [Bug #8822] * hash.c (get_env_cstr): convert non-ASCII string to UTF-8 string. * hash.c (ruby_setenv): use wide char version to put environment variable to deal with non-ASCII value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-05ruby_atomic.h: fix old value type of ATOMIC_CASnobu
* ruby_atomic.h (ATOMIC_CAS): old value to be swapped should be same as the destination. immediate value may need type promotion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-05ruby_atomic.h: fix the argument ordernobu
* ruby_atomic.h (ATOMIC_SIZE_CAS): fix the argument order of InterlockedCompareExchange64. new value and then old value is the last. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-05random.c: fix filling sizenobu
* random.c (fill_random_seed): fix the size to be filled, not the size of element, but the whole size of array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-04vm.c: make ruby_vm_*_ptr staticnormal
No point in wasting space until we get MVM (if ever). * vm.c (ruby_vm_verbose_ptr): make static (ruby_vm_debug_ptr): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-04* include/ruby/ruby.h (RB_OBJ_TAINT): follow-up of r52881.ngoto
Turn into void expression not to use unexpected result. Fix "operands have incompatible types" error with Oracle Solaris Studio 12.x on Solaris. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-04enc/iso_8859_13.c: Added three missing lower/upper-caseduerst
character pairs (from Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-04enc/iso_8859_4.c: Added missing lower/upper-case characterduerst
pair (U+014A and U+014B, LATIN CAPITAL/SMALL LETTER ENG) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-04string.c: should not taint fstringnobu
* string.c (rb_obj_as_string): fstring should not be infected. re-apply r52872 and fix a typo. TODO: other frozen strings also may not be. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-04* lib/rubygems: Update to RubyGems 2.5.0+ HEAD(fdab4c4).hsbt
this version includes #1396, #1397, #1398, #1399 * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-04Revert r52872 "string.c: should not taint fstring"naruse
This reverts commit b887c7c20ab81b50ed7cb8c7db3218c443985d6b. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-04thread.c: name must be ascii-compatiblenobu
* thread.c (rb_thread_setname): name must be ascii-compatible, as pthread APIs do not accept legacy wide char strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-03string.c: should not taint fstringnobu
* string.c (rb_obj_as_string): fstring should not be infected. TODO: other frozen strings also may not be. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-03* lib/scanf.rb: fixed double words typo.hsbt
[ci skip][fix GH-1123] Patch by @jwworth git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-03* test/ruby/test_mixed_unicode_escapes.rb: fixed typo.hsbt
[fix GH-1122] Patch by @davydovanton * test/ruby/test_object.rb: ditto. * test/socket/test_tcp.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-03sprintf.c: fix garbage inserted with Rationalnobu
* sprintf.c (rb_str_format): fix wrong shifting position in Rational conversion when not at the beginning of the result. [ruby-core:71806] [Bug #11766] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-03range.c: infected by the receivernobu
* range.c (range_to_s): should be infected by the receiver. str2 infects by appending. [ruby-core:71811] [Bug #11767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-03configure.in: split SET_THREAD_NAMEnobu
* configure.in: separate SET_CURRENT_THREAD_NAME, which can set the name of current thread only, and SET_ANOTHER_THREAD_NAME, which can set the name of other threads. * thread.c (rb_thread_setname): use SET_ANOTHER_THREAD_NAME. OS X is not possible to set another thread name. * thread_pthread.c (native_set_thread_name, thread_timer): use SET_CURRENT_THREAD_NAME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02* vm_core.h, iseq.h: remove rb_iseq_t::variable_body.ko1
Fields in rb_iseq_t::variable_body are contained by rb_iseq_t::body::mark_ary (hidden Array object). Index 0 to 2 of mark_ary are reserved by these objects. * iseq.c: catch up this fix. * compile.c (rb_iseq_original_iseq): trivial rewrite. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02* iseq.h: introduce ISEQ_ORIGINAL_ISEQ() andko1
ISEQ_ORIGINAL_ISEQ_ALLOC() macro. * compile.c: use them to access original iseq buffer. * iseq.c: ditto. * vm_core.h: rename iseq field to support this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02* iseq.h: introduce ISEQ_FLIP_CNT_INCREMENT() macro.ko1
* compile.c (iseq_compile_each): use it. * vm_core.h: rename flip_cnt field to support this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02* iseq.h: introduce ISEQ_COVERAGE() and ISEQ_COVERAGE_SET() macro.ko1
* compile.c: use them. * iseq.c: ditto. * iseq.c (rb_iseq_coverage): added. * thread.c (update_coverage): use rb_iseq_coverage(). * vm_core.h: rename coverage field name to support this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02encoding.c: make fstringnobu
* encoding.c (enc_name, rb_enc_name_list_i, rb_enc_aliases_enc_i): make fstring instead of making each copies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02* iseq.h: introduce ISEQ_COMPILE_DATA() macro.ko1
* compile.c, iseq.c: use ISEQ_COMPILE_DATA(). * vm_core.h: rename compile_data field to support this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02encoding.c: defer finding encodingnobu
* encoding.c (enc_m_loader): defer finding encoding object not to be infected by marshal source. [ruby-core:71793] [Bug #11760] * marshal.c (r_object0): enable compatible loader on USERDEF class. the loader function is called with the class itself, instead of an allocated object, and the loaded data. * marshal.c (compat_allocator_table): intialize compat_allocator_tbl on demand. * object.c (rb_undefined_alloc): extract from rb_obj_alloc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02* configure.in: Fixed double negative comments.hsbt
[Bug #11698][ruby-core:71506] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e