aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* set: fix SortedSet#superset? with rbtreefix/set-sortedset-comparisonKazuki Yamaguchi2016-03-182-4/+24
| | | | | | * lib/set.rb (Set#{<,<=,>,>=}): check if the internal @hash has <,<=,>,>= operators. In SortedSet, @hash may be a RBTree, which doesn't have them.
* gc.c: fix commit miss r54145nobu2016-03-182-1/+5
| | | | | | * gc.c (tick): fix missing close parenthesis. [Fix GH-1291] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c (datetime_to_time): preserve timezone infosonots2016-03-183-9/+15
| | | | | | [Bug #12189] [Fix GH-1295] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_hash): make it public function to be available inmrkn2016-03-184-11/+18
| | | | | | | | | | | | | other source files, and remove documentation comment for Bignum#hash. * bignum.c (Bignum#hash): remove its definition because it is unified with Object#hash. * include/ruby/intern.h (rb_big_hash): add a prototype declaration. * hash.c (any_hash): treat Bignum values directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/time.rb (parse, strptime): Fix Time.parse/strptime does notsonots2016-03-173-7/+51
| | | | | | | have compatibility with DateTime.parse/strptime in terms of parsing timezone [Bug #12190] [Fix GH-1297] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (fix_zero_p, fix_even_p, fix_odd_p): remove needlessmrkn2016-03-172-49/+5
| | | | | | functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (int_even_p): treat Fixnum and Bignum values directly.mrkn2016-03-172-2/+14
| | | | | | I forgot include this commit in the previous one. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (Bignum#even?, Bignum#odd?): remove definitionsmrkn2016-03-174-27/+33
| | | | | | | | | | | | | | | | because they are unified with Integer#even? and Integer#odd?. * numeric.c (Fixnum#zero?, Fixnum#even?, Fixnum#odd?): remove definitions because they are unified with Numeric#zero?, Integer#even?, and Integer#odd?. * numeric.c (num_zero_p, int_even_p, int_odd_p): treat Fixnum and Bignum values directly. * test/ruby/test_integer.rb (test_odd_p_even_p): remove meaningless test case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_big_even_p, rb_big_odd_p): make them public functionsmrkn2016-03-173-2/+12
| | | | | | | | | to be available in other source files. * include/ruby/intern.h (rb_big_even_p, rb_big_odd_p): add prototype declarations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (ary_inject_op): Implement the specialized code for sum ofakr2016-03-173-27/+54
| | | | | | | | float numbers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-03-18svn2016-03-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2016-03-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (num_step): use rb_equal for zero check. rb_num_coerce_cmpmame2016-03-172-1/+6
| | | | | | created an object which caused extra overhead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: remove RB_GC_GUARD_PTRnobu2016-03-172-12/+9
| | | | | | | * include/ruby/ruby.h (RB_GC_GUARD_PTR): remove intermediate macro, and expand for each RB_GC_GUARD. [Fix GH-1293] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: strict conditionnobu2016-03-171-3/+4
| | | | | | | * compile.c (iseq_specialized_instruction): specialize only concatenated newarray and send, no labels and no adjusts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: move newarray specializationnobu2016-03-172-20/+27
| | | | | | | * compile.c (iseq_specialized_instruction): move specialization for opt_newarray_max/min from translation phase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, enum.c: make rdoc format consistent.mame2016-03-173-11/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * NEWS: add Array#max, #min, and the optimization. [Feature #12172]mame2016-03-172-1/+19
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (NODE_CALL): add optimization shortcut for Array#max/min.mame2016-03-176-0/+102
| | | | | | | | | Now `[x, y].max` is optimized so that a temporal array object is not created in some condition. * insns.def (opt_newarray_max, opt_newarray_min): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_max, rb_ary_min): implement Array#max and min withmame2016-03-174-9/+29
| | | | | | | | | | arguments. replace super call with rb_nmin_run. * enum.c (nmin_run): exported (as rb_nmin_run). * internal.h: added a prototype for rb_nmin_run. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_max, rb_ary_min): implement a block by itself insteadmame2016-03-172-12/+37
| | | | | | of delegating Enumerable#max/min. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_max, rb_ary_min): Array#max and Array#min added.mame2016-03-176-23/+161
| | | | | | | | | | | | | | | [Feature #12172] * internal.h (OPTIMIZED_CMP): moved from enum.c so that array.c can use it. * test/ruby/test_array.rb (test_max, test_min): tests for Array#max and Array#min. * test/ruby/test_enum.rb (test_max, test_min): revised a bit to test Enumerable#max and #min explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.c: struct cmp_opt_data added for refactoring out a datamame2016-03-174-27/+37
| | | | | | | | | | structure for CMP_OPTIMIZABLE * array.c (struct ary_sort_data): use struct cmp_opt_data. * enum.c (struct min_t, max_t, min_max_t): use struct cmp_opt_data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (ary_inject_op): Extracted from enum_inject.akr2016-03-172-57/+71
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_inject): Implement the specialized code for sum ofakr2016-03-175-10/+90
| | | | | | | | | | | | integers including Bignums. * internal.h (rb_fix_plus): Declared to be usable from enum_inject. * numeric.c (rb_fix_plus): Defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_sync.c: Update rdoc for Queue [skip ci]nobu2016-03-172-1/+12
| | | | | | | * thread_sync.c: [DOC] Update documentation for Queue class description. [Fix GH-1292] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: tick for POWER archnobu2016-03-172-0/+17
| | | | | | | | | | | | | * gc.c (tick): Use __builtin_ppc_get_timebase for POWER arch. [Fix GH-1291] This gives a little performance improvement user system total real Before: 20.870000 0.000000 20.870000 ( 20.893959) After: 20.720000 0.000000 20.720000 ( 20.733970) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/securerandom.rb (gen_random): to avoid blocking on Windows.naruse2016-03-172-1/+19
| | | | | | | | | | | | | | | | | | | On Windows OpenSSL RAND_bytes (underlying implementation is RAND_poll in crypto/rand/rand_win.c) may be blocked at NetStatisticsGet. https://wiki.openssl.org/index.php/Random_Numbers#Windows_Issues Instead of this, use Random.raw_seed directory (whose implementation CryptGenRandom is one of the source of entropy of RAND_poll on Windows). https://wiki.openssl.org/index.php/Random_Numbers Note: CryptGenRandom function is PRNG and doesn't check its entropy, so it won't block. [Bug #12139] https://msdn.microsoft.com/ja-jp/library/windows/desktop/aa379942.aspx https://tools.ietf.org/html/rfc4086#section-7.1.3 https://eprint.iacr.org/2007/419.pdf http://www.cs.huji.ac.il/~dolev/pubs/thesis/msc-thesis-leo.pdf git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: bit flagnobu2016-03-171-1/+1
| | | | | | * compile.c (LABEL): turn `set` flag a bit field. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: fix result of assert_nothing_raisednobu2016-03-171-1/+0
| | | | | | | * test/lib/test/unit/assertions.rb (assert_nothing_raised): do not discard the result of the given block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_optimization.rb: tailcallnobu2016-03-171-37/+41
| | | | | | | | * test/ruby/test_optimization.rb (TestRubyOptimization.tailcall): helper method to compile methods with tailcall optimization enabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode.c: Fixed two macro definitions.duerst2016-03-173-2/+14
| | | | | | | | * test/ruby/enc/test_case_mapping.rb: Test cases that detected the above bugs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket/option.c: accurate conditionnobu2016-03-172-1/+12
| | | | | | | | * ext/socket/option.c (inspect_tcpi_msec): more accurate condition for TCPI msec member inspection function. [ruby-core:74388] [Bug #12185] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_marshal.rb: assert bad linknobu2016-03-171-5/+4
| | | | | | | * test/ruby/test_marshal.rb (test_marshal_load_r_prepare_reference_crash): assert an ArgumentError exception at a bad link. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/-ext-/time/test_new.rb (test_timespec_new): Time#gmtoff valuesodaira2016-03-162-1/+9
| | | | | | | are the same only when both or neither of the Time objects are in summer time (daylight-saving time). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): raise ArgumentError when linking to undefineddrbrain2016-03-163-0/+22
| | | | | | | object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_bignum.rb: Make sure to use Bignum values in the tests.mrkn2016-03-162-66/+83
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-03-17svn2016-03-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* transcode-tblgen.rb: chomp invalid linenobu2016-03-161-3/+3
| | | | | | | * tool/transcode-tblgen.rb (citrus_decode_mapsrc): remove newline from invalid line in exception messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* transcode-tblgen.rb: binary modenobu2016-03-161-1/+1
| | | | | | | * tool/transcode-tblgen.rb (citrus_decode_mapsrc): read in binary mode to deal with non-ascii characters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: symbol literals for alias/undefnobu2016-03-166-11/+44
| | | | | | | | * defs/keywords (alias, undef): symbol literals are allowed. * parse.y (parse_percent): should parse symbol literals for alias and undef. [ruby-dev:47681] [Bug #8851] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2016-03-162-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/trans/JIS: update Unicode's notice. [Bug #11844]naruse2016-03-167-183/+150
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: fail symbol proc bindingnobu2016-03-163-0/+16
| | | | | | | * proc.c (proc_binding): proc from symbol can not make a binding. [ruby-core:74100] [Bug #12137] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Fixed and activated a test for Cherokee.duerst2016-03-162-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-03-16svn2016-03-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Fixed a logical error.duerst2016-03-162-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Adding tests for Cherokee.duerst2016-03-162-0/+14
| | | | | | | | One test not yet working. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Adding tests for actual Unicodeduerst2016-03-162-6/+27
| | | | | | | | case mapping. Fixing some aliasing issues. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_inject): Consider redefinition of Fixnum#+.akr2016-03-153-1/+19
| | | | | | | | [ruby-dev:49510] [Bug#12178] Reported by usa. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e