aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* {Enumerable,Array,Range}#first, {Array,Range}#last with blockfeature/enumerable-first-with-blockKazuki Yamaguchi2016-04-127-51/+178
| | | | | | | | | | | | * array.c (rb_ary_first, ary_last): extend Array#{first,last} to accept a block. If a block is passed, these methods collects only elements for which the block returns a truthy value. * enum.c: extend Enumerable#first to accept a block. * range.c: extend Range#{first,last} to accept a block. * gc.c: avoid using rb_ary_last(), because it may call a block. * test/ruby/test_array.rb: add test * test/ruby/test_enum.rb: ditto * test/ruby/test_range.rb: ditto
* date_core.c: preserve timezonenobu2016-04-123-2/+24
| | | | | | | * ext/date/date_core.c (time_to_time): should preserve timezone info. [ruby-core:74889] [Bug #12271] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* basictest: disable warningsnobu2016-04-121-1/+1
| | | | | | * basictest/runner.rb: disable warnings for old test script. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: initialize LABEL fieldsnobu2016-04-122-0/+7
| | | | | | | * compile.c (new_label_body): initialize bit fields, since compile_data_alloc does not clear the memory. [Bug #12082] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-04-12svn2016-04-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_optimization.rb: disasmnobu2016-04-121-4/+10
| | | | | | | * test/ruby/test_optimization.rb (disasm): dump disassembled code for investigation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos [ci skip]kazu2016-04-111-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update dependencies.akr2016-04-1132-1/+209
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_backtrace.c (frame2klass): filter only for imemo_ment.ko12016-04-112-5/+10
| | | | | | | T_IMEMO/imemo_iseq can be passed here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: disable tco with rescuenobu2016-04-113-2/+75
| | | | | | | | * compile.c (iseq_optimize): disable tail call optimization in rescued, rescue, and ensure blocks. [ruby-core:73871] [Bug #12082] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* TestException.rb: suppress warningnobu2016-04-111-2/+1
| | | | | | | * test/excludes/TestException.rb: suppress "ambiguous first argument" warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/unit.rb: show warning locationsnobu2016-04-111-1/+1
| | | | | | | * test/lib/test/unit.rb (ExcludedMethods.load): supply the path to show the warning locations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_whileuntil.rb: fix old behaviornobu2016-04-111-1/+1
| | | | | | | | * test/ruby/test_whileuntil.rb (test_while): fix old behavior. mere numeric literal in condition no longer matches $. global variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_rubyoptions.rb: suppress warningnobu2016-04-111-1/+0
| | | | | | | * test/ruby/test_rubyoptions.rb (test_indentation_check): remove unused variable to suppress warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_regexp.rb: suppress warningnobu2016-04-111-2/+4
| | | | | | | * test/ruby/test_regexp.rb (test_named_capture): suppress "assigned but unused variable" warning by prefixing '_'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_iterator.rb: suppress warningsnobu2016-04-111-3/+3
| | | | | | | * test/ruby/test_iterator.rb (test_break): suppress "statement not reached" warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_coverage.rb: suppress warningsnobu2016-04-111-5/+5
| | | | | | | | * test/coverage/test_coverage.rb (test_coverage_snapshot), (test_restarting_coverage): use unique names to suppress method redefinition warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fiddle/import.rb: suppress warningsnobu2016-04-111-6/+9
| | | | | | | * ext/fiddle/lib/fiddle/import.rb (type_alias, handler): suppress "not initialized instance variable" warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: prefer rb_check_aritynobu2016-04-101-21/+12
| | | | | | | | | | | | * file.c (rb_file_s_expand_path, rb_file_s_absolute_path): use rb_check_arity instead of rb_scan_args for a simple optional argument. * file.c (rb_file_s_realpath, rb_file_s_realdirpath): ditto. * file.c (rb_file_s_basename): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: apply2files returns Fixnumnobu2016-04-101-21/+9
| | | | | | | * file.c (apply2files): return Fixnum so that callers can just return it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-04-11svn2016-04-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c: apply to argvnobu2016-04-102-31/+33
| | | | | | | * file.c (apply2files): apply to a VALUE vector instead of a temporary array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* registry.rb: fix API namesnobu2016-04-102-2/+7
| | | | | | | * ext/win32/lib/win32/registry.rb (DeleteValue, DeleteKey): fix API names. [ruby-core:74863] [Bug #12264] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* no argument conversions in rb_realpath_internalnobu2016-04-102-1/+9
| | | | | | | | | * file.c (rb_realpath_internal): no argument conversions since this internal function does not need to_path and encoding conversions, not to be affected by the default internal encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-04-10svn2016-04-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/file.c: fix freenobu2016-04-101-4/+4
| | | | | | | | * win32/file.c (rb_file_expand_path_internal): should free wpath, but not xfree, corresponding to rb_w32_mbstr_to_wstr which allocates by malloc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb: [DOC] fix position of nodoc directive.ktsj2016-04-091-2/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/tk/extconf.rb: add newlinenobu2016-04-091-9/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* load.c: fix r54521nobu2016-04-091-5/+2
| | | | | | * load.c (rb_f_load): do not convert the encoding twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* assertions.rb: set default internal encodingnobu2016-04-0913-78/+53
| | | | | | | | | | * test/lib/test/unit/assertions.rb (assert_raise_with_message): set default internal encoding to the excpected message, which affects String#inspect in messages. * test/lib/test/unit/assertions.rb (assert_warning): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* load.c: raise name before conversionnobu2016-04-092-2/+10
| | | | | | | * load.c (rb_f_load): raise with the original path name before encoding conversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_m17n.rb: nil default internal encodingnobu2016-04-091-2/+2
| | | | | | | * test/ruby/test_io_m17n.rb (test_bom_non_utf): ensure default internal encoding is not set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-04-09svn2016-04-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bignum.c: rb_cstr_parse_inumnobu2016-04-084-91/+169
| | | | | | | | | | | | * bignum.c (rb_cstr_parse_inum): [EXPERIMENTAL] new function to parse integer in C-string with length. the name and the arguments may be changed in the future. * bignum.c (rb_str_to_inum): preserve encoding of the argument in error messages, and no longer needs to copy non-terminated strings. * bignum.c (rb_str2big_{poweroftwo,normal,karatsuba,gmp}): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bignum.c: radix check functionsnobu2016-04-081-14/+28
| | | | | | | * bignum.c (valid_radix_p, invalid_radix): extracted functions to check radix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tk/extconf.rb: progressnobu2016-04-081-13/+22
| | | | | | | * ext/tk/extconf.rb (progress): print progress messages only if Logging is quiet. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tk/extconf.rb: outdated checksnobu2016-04-082-10/+0
| | | | | | | | | | | * ext/tk/extconf.rb: remove outdated checks. * ext/tk/tcltklib.c (ip_ruby_cmd): remove longstanding dead code. ptr and len in RArray were till 1.8 and have_struct_member of 1.8 does not set HAVE_<stuct_name>_<member_name> but only HAVE_ST_<member_name>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* dln.c: move error message definitionnobu2016-04-071-2/+4
| | | | | | | * dln.c (dln_load): move the definition of incompatible library version error message to be shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-04-08svn2016-04-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typo [ci skip]kazu2016-04-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32.c: call w32_wopen directlynobu2016-04-071-3/+2
| | | | | | | * win32/win32.c (rb_w32_uopen): call w32_wopen directly instead of variadic rb_w32_wopen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* regexp.rdoc: terminators in comments [ci skip]nobu2016-04-072-0/+8
| | | | | | | * doc/regexp.rdoc (comments): [DOC] terminators cannot appear in comments. [ruby-core:74838] [Bug #12256] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tkutil.c: fix overrunnobu2016-04-072-5/+12
| | | | | | | * ext/tk/tkutil/tkutil.c (cbsubst_initialize): fix out-of-bound access when no arguments given. `p Tk::Event.new` crashed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fake.rb: set extoutnobu2016-04-071-0/+2
| | | | | | | * tool/fake.rb (prehook): set "extout" in RbConfig to configure extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-04-07svn2016-04-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_ssl.rb: skip unsupported ciphersnobu2016-04-071-1/+6
| | | | | | | * test/openssl/test_ssl.rb (test_get_ephemeral_key): skip unsupported ciphers. [GH-1318] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/coverage/coverage.c: Fully reset coverage to not persist global state.eregon2016-04-064-27/+34
| | | | | | | | | | It was returning old file coverages as empty arrays to the user. [ruby-core:74596] [Bug #12220] * ext/coverage/coverage.c (rb_coverages): remove unused static state. * thread.c: Moved and renamed coverage_clear_result_i to reset_coverage_i. * test/coverage/test_coverage.rb: improve precision of tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: fix lgamma_r conditionnobu2016-04-062-1/+9
| | | | | | | * configure.in (rb_cv_lgamma_r_m0): fix the condition for lgamma_r(-0.0). [Bug #12249] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/downloader.rb (RubyGems.download): follow the change of theusa2016-04-062-1/+6
| | | | | | | rubygems ssl_certs directory tree introduced by previous commit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* btest: resource limitnobu2016-04-061-4/+12
| | | | | | * bootstraptest/test_thread.rb: rescue resource limitation errors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e