Граф коммитов

42969 Коммитов

Автор SHA1 Сообщение Дата
nobu 7343b492a2 ruby-runner.h
* template/ruby-runner.h.in: separate configured part from
  ruby-runner.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-14 01:30:12 +00:00
nobu 1a88b871d1 configure.in: feature macros on cygwin
* configure.in (cygwin): add feature macros for the declarations
  of eaccess.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-14 01:25:34 +00:00
nobu a86d5d166f configure.in: tabify
* configure.in: tabify spaces after a tab.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-14 01:25:33 +00:00
svn 90a5257da3 * 2016-04-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-14 00:00:33 +00:00
akr 350a740058 [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-14 00:00:32 +00:00
akr 8574a372a0 Array#sum described.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 14:55:18 +00:00
akr 30d7fb3791 add a space in [ruby-core:74569] [Feature #12217]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 14:40:20 +00:00
akr b359d20352 * array.c (rb_ary_sum): Array#sum is implemented.
Kahan's compensated summation algorithm for precise sum of float
  numbers is moved from ary_inject_op in enum.c.

* enum.c (ary_inject_op): Don't specialize for float numbers.

  [ruby-core:74569] [Feature#12217] proposed by mrkn.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 13:51:53 +00:00
nobu c258535186 numeric.c: flo_ceil
* numeric.c (flo_ceil): add an optional parameter, digits, as
  well as Float#round.  [Feature #12245]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 06:56:36 +00:00
nobu d56b277684 numeric.c: flo_floor
* numeric.c (flo_floor): add an optional parameter, digits, as
  well as Integer#floor.  [Feature #12245]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 06:54:38 +00:00
nobu a1542d33ca numeric.c: int_ceil
* numeric.c (int_ceil): add an optional parameter, digits, as
  well as Integer#round.  [Feature #12245]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 06:50:24 +00:00
nobu 15558a8f57 numeric.c: int_floor
* numeric.c (int_floor): add an optional parameter, digits, as
  well as Integer#round.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 06:47:55 +00:00
nobu 163604ec52 NEWS: [Feature #9969]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 06:14:12 +00:00
nobu 096137e84f file.c: File.empty?
* file.c (Init_File): add alias File.empty? to File.zero?.
  [Feature #9969]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 05:47:49 +00:00
nobu 134d1ce892 parse.y: massign in cond
* parse.y (assign_in_cond): allow multiple assignment in
  conditional expression.  [Feature #10617]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 05:36:26 +00:00
nobu 1ea1d2e4a7 numeric.c: int_round_zero_p
* bignum.c (rb_big_size): add wrapper function of BIGSIZE and
  rename the method funtion with _m suffix.
* numeric.c (int_round_zero_p): extracted from rb_int_round.
  optimize for Bignum, and convert VALUE returned by Numeric#size
  to long.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 05:12:01 +00:00
ko1 9d25813745 * test/ruby/test_basicinstructions.rb: add a test to check access
instance variables on special const objects.

  All of such objects are frozen, so that we can not set instance
  variables for them. But we can read instance variables and return
  default value (nil).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 03:03:37 +00:00
svn 182f8d7e27 * 2016-04-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 02:41:25 +00:00
nobu aaf0f51f46 numeric.c: float_invariant_round
* numeric.c (float_invariant_round): extracted from flo_round to
  be optimizer-friendly, e.g., tail-call optimization.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-13 02:41:24 +00:00
nobu 456523e2ed date_core.c: preserve timezone
* 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
2016-04-12 11:40:37 +00:00
nobu 991c159c17 basictest: disable warnings
* 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
2016-04-12 03:49:03 +00:00
nobu 6648d61578 compile.c: initialize LABEL fields
* 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-12 02:51:20 +00:00
svn 057cf38cd7 * 2016-04-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-12 00:30:56 +00:00
nobu 263177507e test_optimization.rb: disasm
* 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
2016-04-12 00:30:55 +00:00
kazu 88c7ffb251 fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11 12:39:31 +00:00
akr 9d8ef4ea20 Update dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11 11:50:00 +00:00
ko1 6278420729 * vm_backtrace.c (frame2klass): filter only for imemo_ment.
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
2016-04-11 11:19:52 +00:00
nobu f0226f0a3c compile.c: disable tco with rescue
* 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
2016-04-11 08:43:06 +00:00
nobu 0ebf3849e4 TestException.rb: suppress warning
* 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
2016-04-11 08:27:19 +00:00
nobu 316bb88f5a test/unit.rb: show warning locations
* 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
2016-04-11 08:27:17 +00:00
nobu ba001b4160 test_whileuntil.rb: fix old behavior
* 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
2016-04-11 08:06:23 +00:00
nobu 015b492281 test_rubyoptions.rb: suppress warning
* 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
2016-04-11 08:06:22 +00:00
nobu d9f6850ef3 test_regexp.rb: suppress warning
* 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
2016-04-11 08:06:21 +00:00
nobu c372b1236e test_iterator.rb: suppress warnings
* 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
2016-04-11 08:06:19 +00:00
nobu ba56de8b06 test_coverage.rb: suppress warnings
* 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
2016-04-11 05:13:31 +00:00
nobu bf6a8134f8 fiddle/import.rb: suppress warnings
* 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
2016-04-11 04:28:16 +00:00
nobu e9bb167bfb file.c: prefer rb_check_arity
* 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
2016-04-10 21:59:02 +00:00
nobu e19df562a8 file.c: apply2files returns Fixnum
* 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-10 21:59:01 +00:00
svn df63c544a6 * 2016-04-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-10 21:54:43 +00:00
nobu 03bf343a9f file.c: apply to argv
* 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
2016-04-10 21:54:41 +00:00
nobu 21992b6cbd registry.rb: fix API names
* 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
2016-04-10 11:54:17 +00:00
nobu 3cd3c9d74c no argument conversions in rb_realpath_internal
* 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-10 08:47:44 +00:00
svn ee83372106 * 2016-04-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-10 07:30:42 +00:00
nobu 75dc429f3e win32/file.c: fix free
* 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
2016-04-10 07:30:42 +00:00
ktsj 997df3ad01 * lib/ostruct.rb: [DOC] fix position of nodoc directive.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-09 13:39:32 +00:00
nobu 21791dd97f ext/tk/extconf.rb: add newline
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-09 04:01:35 +00:00
nobu e6c88132a5 load.c: fix r54521
* 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
2016-04-09 03:58:01 +00:00
nobu 404bf57aaf assertions.rb: set default internal encoding
* 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
2016-04-09 01:25:11 +00:00
nobu 56417d1f24 load.c: raise name before conversion
* 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
2016-04-09 01:03:15 +00:00
nobu 7aa83cd0f8 test_io_m17n.rb: nil default internal encoding
* 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-09 00:59:53 +00:00