aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* vm_eval.c: cache resultsnobu2015-08-223-16/+58
| | | | | | | | * vm_eval.c (check_funcall_failed, check_funcall_missing): cache results of respond_to? and respond_to_missing?, and search a pulibc method only for compatibility with rb_respond_to. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c: pass thread toonobu2015-08-221-1/+3
| | | | | | * vm_eval.c (check_funcall_missing): pass same thread to call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c: reuse found method entrynobu2015-08-221-18/+21
| | | | | | | * vm_eval.c (check_funcall_missing): reuse found method entry instead of searching same entry repeatedly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: fix a typonobu2015-08-221-1/+1
| | | | | | * ChangeLog: fix a usual typo, thraed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2015-08-210-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/thread/thread.c: move definitions of Queue, SizedQueueko12015-08-215-1173/+1198
| | | | | | | | | | | | | | | | | | | | | and ConditionalVariables to thread_tools.c. In other wowrds, such classes are built-in. [Feature #8919] At first, I planned to embed only a Queue class. However, rubygems requires 'thread.rb' (rubygems are required at first, when launch MRI without --disable-gems). So most of people require 'thread.rb' as an embedded library. Now, ext/thread/thread.c is empty, only for a dummy for compatibility. * thread.c: move a definition of Mutex class to thread_tools.c. And define Mutex class under Thread (so now Mutex is Thread::Mutex). Because other thread related classes are also defined under Thread. We remain ::Mutex as Thread::Mutex. Only an inspect result is changed. * common.mk: add dependency from thread.o to thraed_tools.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_opts.h, iseq.c, iseq.h: add compile option to force frozenko12015-08-216-3/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | string literals. [Feature #11473] This addition is not specification change, but to try frozen string literal world discussed on [Feature #11473]. You can try frozen string literal world using this magical line: RubyVM::InstructionSequence.compile_option = {frozen_string_literal: true} Note that this is a global compilation option, so that you need to compile another script like that: p 'foo'.frozen? #=> false RubyVM::InstructionSequence.compile_option = {frozen_string_literal: true} p 'foo'.frozen? #=> false, because this line is already compiled. p eval("'foo'.frozen?") #=> true Details: * String literals are deduped by rb_fstring(). * Dynamic string literals ("...#{xyz}...") is now only frozen, not deduped. Maybe you have other ideas. Now, please do not use this option on your productions :) Of course, current specification can be changed. * compile.c: ditto. * test/ruby/test_iseq.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2015-08-210-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/*: update to Psych 2.0.14tenderlove2015-08-218-8/+36
| | | | | | * test/psych/*: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-08-22svn2015-08-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c: use update argcnobu2015-08-211-2/+2
| | | | | | | * vm_insnhelper.c (vm_invoke_block): use ci->argc updated by CALLER_SETUP_ARG(). [Bug #11451] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/objspace/objspace.c: add a new method ObjectSpace.count_symbols.ko12015-08-216-0/+116
| | | | | | | | | | | | [Feature #11158] * symbol.c (rb_sym_immortal_count): added to count immortal symbols. * symbol.h: ditto. * test/objspace/test_objspace.rb: add a test for this method. * NEWS: describe about this method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.sub: link libraries for extensionsnobu2015-08-212-1/+7
| | | | | | | | * win32/Makefile.sub ($(LIBRUBY_SO)): needs additional libraries for extension libraries to link statically. [ruby-core:70499] [Feature #9018] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h, cont.c, vm_trace.c: add a new eventko12015-08-215-1/+68
| | | | | | | | | | | fiber_switch. We need more discussion about this feature so that I don't write it on NEWS. [Feature #11348] * test/ruby/test_settracefunc.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_invoke_block): we should not expect ci->argc isko12015-08-213-3/+36
| | | | | | | | | | stable after invoking a block. [Bug #11451] * test/ruby/test_yield.rb: add a test. This test script is given by Alex Dowad. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-08-21svn2015-08-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/openssl/test_ssl_session.rb: Fix tests so that they take in totenderlove2015-08-202-4/+9
| | | | | | | | account OpenSSL installations that have SSLv3 disabled by default. Thanks Jeremy Evans <code@jeremyevans.net> for the patches. [Bug #11366] [Bug #11367] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix indent (tabify) [ci skip]kazu2015-08-201-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c: redefined respond_to_missing?nobu2015-08-202-20/+42
| | | | | | | * vm_method.c (basic_obj_respond_to): call respond_to_missing? only when redefined. [ruby-core:70460] [Bug #11465] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c: share with rb_obj_respond_tonobu2015-08-204-26/+51
| | | | | | | | | * vm_eval.c (check_funcall_respond_to): share the behavior with rb_obj_respond_to. [ruby-core:70460] [Bug #11465] * vm_method.c (vm_respond_to): extract from rb_obj_respond_to and merge r39881. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_method.c: reuse method entrynobu2015-08-194-8/+21
| | | | | | | * vm_method.c (rb_obj_respond_to): reuse found method entry instead of searching same entry repeatedly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: support known reparse points onlynobu2015-08-193-4/+33
| | | | | | | | * dir.c (replace_real_basename), win32/win32.c (opendir_internal): check reparse point tags and treat supported tags only as symbolic links. [ruby-core:70454] [Bug #11462] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-08-20svn2015-08-191-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/lib/openssl/ssl.rb (module OpenSSL): add OP_ALL totenderlove2015-08-193-3/+14
| | | | | | | | | | | | existing options rather than just setting it. Some vendors apply custom patches to their versions of OpenSSL that set default values for options. This commit respects the custom patches they've applied. * test/openssl/test_ssl.rb (class OpenSSL): check that OP_ALL has been added to the options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: [DOC] env values in spawn [ci skip]nobu2015-08-192-1/+6
| | | | | | | * process.c (rb_f_spawn): [DOC] elaborate environment variable values. [ruby-core:70456] [Bug #11463] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: support known reparse points onlynobu2015-08-192-37/+56
| | | | | | | | * win32/win32.c (winnt_lstat): check reparse point tags and treat supported tags only as symbolic links. [ruby-core:70454] [Bug #11462] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-08-19svn2015-08-191-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: initialize variablenobu2015-08-191-0/+1
| | | | | | | * io.c (rb_io_each_codepoint): fix use of uninitialized variable. [Bug #11444] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (reserve_stack): ensure the memory is reallynaruse2015-08-182-1/+6
| | | | | | allocated. [Bug #11457] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix labelargnobu2015-08-183-2/+13
| | | | | | | * parse.y (IS_BEG): include labeled argument state, which was EXPR_LABELARG. [ruby-dev:49221] [Bug #11456] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: define RClass only in Cnobu2015-08-182-5/+8
| | | | | | | | * include/ruby/ruby.h (RClass): define only in C, `__attribute__` between `struct` and the name can't compile with g++. [ruby-core:70297] [Bug #11426] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-08-18svn2015-08-181-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: adjust for g++nobu2015-08-182-2/+7
| | | | | | | * include/ruby/ruby.h (RClass): move `__attribute__` after the keyword `struct` for g++. [ruby-core:70297] [Bug #11426] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix block after conditionalnobu2015-08-173-22/+49
| | | | | | | | * parse.y: fix syntax error at do-block after a conditional operator. separate label-allowed and after-a-label states from others as bit flags. [ruby-dev:48790] [Bug #10653] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: revert arg in r47649nobu2015-08-171-13/+3
| | | | | | * parse.y (arg): revert a part of r47649. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* LEGAL: adjust stylenobu2015-08-171-48/+50
| | | | | | * LEGAL: remove asterisk decorations and adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-08-17svn2015-08-171-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: raise at incomplete charnobu2015-08-174-19/+48
| | | | | | | * io.c (rb_io_each_codepoint): raise an exception at incomplete character before EOF when conversion takes place. [Bug #11444] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gems/bundled_gems: update latest version of bundled gems.hsbt2015-08-162-2/+7
| | | | | | It includes minitest-5.8.0 and test-unit 3.1.3. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-08-16svn2015-08-161-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_mark_children): check if RCLASS_EXT is validktsj2015-08-162-1/+9
| | | | | | | | | before marking. This fixes the following test failure introduced in r51126: make test-all TESTOPTS='--gc-stress ruby/test_refinement.rb' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ossl_ssl.c: check SSL method namenobu2015-08-152-2/+12
| | | | | | | * ext/openssl/ossl_ssl.c (ossl_sslctx_set_ssl_version): SSL method name must not contain NUL. preserve the encoding of message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use assert_raisenobu2015-08-151-4/+4
| | | | | | | * test/openssl/test_ssl.rb: use assert_raise instead of a deprecated method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use rb_sym2strnobu2015-08-153-5/+5
| | | | | | | | | | | * ext/openssl/ossl_ssl.c (ossl_sslctx_set_ssl_version): use rb_sym2str to get rid of inadvertent ID creations. * ext/socket/ancdata.c (ancillary_inspect): ditto. * ext/socket/option.c (sockopt_inspect): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* range.c: call range_include directly if possiblenobu2015-08-151-1/+7
| | | | | | | * range.c (range_eqq): trivial optimization to jump to range_include directly if the method is not redefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/registry.rb: size in bytesnobu2015-08-152-1/+6
| | | | | | | * ext/win32/lib/win32/registry.rb (API#SetValue): data size should be in bytes, not in chars. [ruby-core:70365] [Bug #11439] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: read more datanobu2015-08-153-0/+42
| | | | | | | * io.c (rb_io_each_codepoint): read more data when read partially. [ruby-core:70379] [Bug #11444] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: improve integer/fixnum hashingnormal2015-08-142-14/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The low bits of Ruby object IDs are rarely populated in the current implementation, so ensure the get used. Early versions of this patch redundantly shifted static symbols in any_hash, causing regresions with static symbols in hash_aref_sym * hash.c (any_hash): skip rb_objid_hash for static syms (rb_num_hash_start): extract from rb_ident_hash (rb_objid_hash): call rb_num_hash_start (rb_ident_hash): ditto [ruby-core:70181] [Feature #11405] target 0: a (ruby 2.3.0dev (2015-07-30 trunk 51437) [x86_64-linux] target 1: b (ruby 2.3.0dev (2015-07-30 patch 51437) [x86_64-linux] benchmark results from Xeon E3-1230 v3 @ 3.30GHz (turbo disabled): minimum results in each 10 measurements. Execution time (sec) name a b hash_aref_dsym 0.316 0.300 hash_aref_dsym_long 5.106 5.063 hash_aref_fix 0.304 0.297 hash_aref_flo 0.061 0.060 hash_aref_miss 0.433 0.430 hash_aref_str 0.408 0.396 hash_aref_sym 0.312 0.306 hash_aref_sym_long 0.482 0.469 hash_flatten 0.385 0.273 hash_ident_flo 0.036 0.037 hash_ident_num 0.277 0.276 hash_ident_obj 0.291 0.284 hash_ident_str 0.289 0.286 hash_ident_sym 0.285 0.281 hash_keys 0.269 0.271 hash_shift 0.020 0.016 hash_values 0.264 0.264 loop_whileloop2 0.101 0.099 vm2_bighash* 3.066 2.972 Speedup ratio: compare with the result of `a' (greater is better) name b hash_aref_dsym 1.052 hash_aref_dsym_long 1.008 hash_aref_fix 1.024 hash_aref_flo 1.015 hash_aref_miss 1.007 hash_aref_str 1.031 hash_aref_sym 1.018 hash_aref_sym_long 1.027 hash_flatten 1.410 hash_ident_flo 0.994 hash_ident_num 1.001 hash_ident_obj 1.022 hash_ident_str 1.012 hash_ident_sym 1.016 hash_keys 0.992 hash_shift 1.237 hash_values 1.001 loop_whileloop2 1.013 vm2_bighash* 1.032 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.c (rb_iseq_mark): reduce NULL checksnormal2015-08-142-3/+7
| | | | | | | | iseq_location_setup always sets path, label and base_label fields, and the only caller of iseq_location_setup (prepare_iseq_build) will always pass non-nil `name' and `path' arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-08-15svn2015-08-141-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e