aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ostruct.rb: fix NameErrornobu2015-09-262-2/+17
| | | | | | | * lib/ostruct.rb (delete_field): do not raise NameError for existing keys. [Fix GH-1033] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: clear envs for GEMnobu2015-09-261-0/+4
| | | | | | | * common.mk: clear environment variables for GEM paths to get rid of searching unexpected gems. fix failures on travis-ci. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-09-27svn2015-09-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb: Move method definitions for getter/setter to be lazyzzak2015-09-262-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by @sferik in [GH-1033]: https://github.com/ruby/ruby/pull/1033 Instead of defining two methods -- a reader and writer -- for each OpenStruct attribute when it is initialized, define them lazily, the first time either one is called. This adheres to the principle of "pay for use": methods that are never accessed are never defined. This optimization makes initialization an order of magnitude faster for objects with 100 attributes. In the worst-case scenario, where every attribute is accessed, performance is no worse than it is today. Benchmark --------- require 'benchmark/ips' require 'ostruct' N = 100 ATTRS = (:aa..:zz).take(N) HASH = Hash[ATTRS.map { |x| [x, x] }] def ostruct OpenStruct.new(HASH) end Benchmark.ips do |x| x.report('ostruct') { ostruct } end ------------------------------------------------- before 2.279k (± 8.8%) i/s - 11.395k after 24.702k (±12.8%) i/s - 122.600k ------------------------------------------------- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* prelude.c.tmpl: workaroundnobu2015-09-261-10/+10
| | | | | | * template/prelude.c.tmpl: prevent ruby-mode from confusion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-09-26svn2015-09-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_syntax.rb: splitnobu2015-09-261-2/+11
| | | | | | | * test/ruby/test_syntax.rb (test_keyword_splat): split duplicate keywords tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* marshal.c: reduce arity checksnobu2015-09-251-11/+23
| | | | | | | | | | * marshal.c (rb_marshal_dump_limited): get rid of redundant arity check to dump object with limited nest level. * marshal.c (rb_marshal_load_with_proc): get rid of redundant arity check to load object with hook proc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* marshal.c: reentrant checksnobu2015-09-251-33/+24
| | | | | | | | * marshal.c (dump_funcall, dump_check_funcall, load_funcall): function calls with reentrant check. always show names corresponding to the called methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* marshal.c: use STATIC_ASSERTnobu2015-09-251-1/+1
| | | | | | * marshal.c (MARSHAL_INFECTION): check size by STATIC_ASSERT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parser.c: updatenobu2015-09-251-18/+26
| | | | | | * ext/json/parser/parser.c: update to r51946. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parser.rl: rb_scan_argsnobu2015-09-251-1/+9
| | | | | | | * ext/json/parser/parser.rl (cParser_initialize): use ':' in rb_scan_args. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c: GC guardsnobu2015-09-251-0/+2
| | | | | | | * hash.c (env_delete, env_aset): prevent environment variable names from GC while ruby_setenv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http.rb: removed unused variable. It's removed at r13648.hsbt2015-09-252-2/+5
| | | | | | [fix GH-1022] Patch by @nkondratyev git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gems/bundled_gems: upgrade to minitest-5.8.1hsbt2015-09-252-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * id_table.c: fix typo. [ci skip][fix GH-1031] Patch @davydovantonhsbt2015-09-252-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-09-25svn2015-09-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_lock): skipodaira2015-09-242-1/+7
| | | | | | | this test on AIX. The issue is the same as on Solaris. [ruby-dev:47631] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix indent (tabify) [ci skip]kazu2015-09-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos [ci skip]kazu2015-09-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix tokennobu2015-09-243-2/+36
| | | | | | | * parse.y (paren_args): fix separator token at `foo::bar()` in ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: same timespecnobu2015-09-241-1/+4
| | | | | | | * file.c (rb_file_s_utime): same timespec for same time object. assume time objects are static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/tk: remove $SAFE 2..4 codenobu2015-09-2411-83/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/Setup: updatenobu2015-09-241-1/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-09-24svn2015-09-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: ruby/config.h must be included before math.hodaira2015-09-232-0/+8
| | | | | | | | because it defines _LARGE_FILES on AIX and _LARGE_FILES must be defined before sys/types.h is included from math.h. [Bug #11483] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.c: feature bitsnobu2015-09-231-23/+24
| | | | | | | * ruby.c (enum feature_flag_bits, struct cmdline_options): turn negative logic disable bits into positive logic feature bits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_pkcs12*: Remove svn commit id macrozzak2015-09-233-2/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-09-23svn2015-09-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/*: Remove svn commit id macros to make sync easierzzak2015-09-2258-122/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: fallback to WCHAR-version in MSVCRTnobu2015-09-221-31/+17
| | | | | | | * win32/win32.c (rb_w32_open): should not fallback to ANSI-version in MSVCRT, fallback to WCHAR-version in rb_w32_wopen instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/drb/test_drb.rb: Run Rinda/DRb tests on localhost. [Fix GH-1027]seki2015-09-213-5/+12
| | | | | | | | | | patch by voxik. * test/rinda/test_rinda.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: fix symbol conditionnobu2015-09-211-1/+1
| | | | | | | * ext/win32ole/win32ole.c (fole_missing): fix symbol condition, rb_check_symbol returns Qnil when the symbol is not interned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-09-22svn2015-09-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: inadvertent symbol creationnobu2015-09-211-8/+10
| | | | | | | * ext/win32ole/win32ole.c (GetIDsOfNames, fole_missing): avoid inadvertent symbol creation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: refactornobu2015-09-211-21/+25
| | | | | | * ext/win32ole/win32ole.c (ole_wc2mb): refactor. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: make ole_mb2wc more genericnobu2015-09-211-34/+15
| | | | | | | | * ext/win32ole/win32ole.c (ole_vstr2wc): use ole_mb2wc. * ext/win32ole/win32ole.c (ole_mb2wc): parametrize code page. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32ole.c: constifiednobu2015-09-211-15/+18
| | | | | | * ext/win32ole/win32ole.c (vtEventSink): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-09-21svn2015-09-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_win32ole_event.rb: fix typo [ci skip]nobu2015-09-212-2/+7
| | | | | | | * test/win32ole/test_win32ole_event.rb: fix typo. swbemsink_avairable? => swbemsink_available? [Fix GH-1025] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: separate resetting code rangenobu2015-09-201-25/+17
| | | | | | | * string.c (rb_str_setbyte): separate resetting code range by each code range, and remove unnecessary branches. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: append to continuations doc [ci skip]nobu2015-09-202-0/+23
| | | | | | | * cont.c (rb_callcc): [DOC] append continuations example accros methods. [Fix GH-1026] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: simplify ripper_id2symnobu2015-09-191-1/+1
| | | | | | | | * parse.y (ripper_id2sym): remove unnecessary comparison as rb_ispunct has stricter condition, and cast explicitly to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (rb_iseq_free): free rb_iseq_t::body::cc_entries.ko12015-09-192-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: split rb_call_info_t into several structs.ko12015-09-1912-522/+681
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rb_call_info (ci) has compiled fixed information. * if ci->flag & VM_CALL_KWARG, then rb_call_info is also rb_call_info_with_kwarg. This technique reduce one word for major rb_call_info data. * rb_calling_info has temporary data (argc, blockptr, recv). for each method dispatch. This data is allocated only on machine stack. * rb_call_cache is for inline method cache. Before this patch, only rb_call_info_t data is passed. After this patch, above three structs are passed. This patch improves: * data locarity (rb_call_info is now read-only data). * reduce memory consumption (rb_call_info_with_kwarg, rb_calling_info). * compile.c: use above data. * insns.def: ditto. * iseq.c: ditto. * vm_args.c: ditto. * vm_eval.c: ditto. * vm_insnhelper.c: ditto. * vm_insnhelper.h: ditto. * iseq.h: add iseq_compile_data::ci_index and iseq_compile_data::ci_kw_indx. * tool/instruction.rb: introduce TS_CALLCACHE operand type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-09-20svn2015-09-191-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: mkfifo command based File.mkfifo methodakr2015-09-192-5/+5
| | | | | | | | definition removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.h: rb_iseq_tnobu2015-09-192-0/+8
| | | | | | | | | * iseq.h (rb_iseq_t): also should be defined here for prototype declarations arguments. * method.h (rb_iseq_t): get rid of redefinition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-09-19svn2015-09-191-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* iseq.h, method.h: fix include guards [ci skip]nobu2015-09-192-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e