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

42968 Коммитов

Автор SHA1 Сообщение Дата
nobu d1e2d6a9c5 sprintf.c: simplify
* sprintf.c (rb_str_format): remove repeated calculations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-27 03:55:08 +00:00
nobu ee2f3c6def sprintf.c: Rational f by generic Integer functions
* sprintf.c (rb_str_format): convert Rational to floating point
  format by using gereric Integer functions, not by methods which
  can be overwritten.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-27 03:13:39 +00:00
svn 3ce3e196ac * 2016-03-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-27 01:18:11 +00:00
nobu 4719d4ec7b gen_dummy_probes.rb: argument names
* tool/gen_dummy_probes.rb: preserve macro argument names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-27 01:18:10 +00:00
nobu 4859714932 test_integer.rb: refine test_round
* test/ruby/test_integer.rb (test_round): refine assertions and
  borrow from rubyspec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-26 02:03:49 +00:00
nobu 23e5b482ca numeric.c: rb_int2str
* numeric.c (rb_int2str): conversion function to String for
  generic Integer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-26 01:55:14 +00:00
nobu e9dc649d66 numeric.c: rb_int_round
* numeric.c (rb_int_round): rounding function for generic
  Integers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-26 01:54:50 +00:00
nobu 79b209f19a numeric.c: basic arithmetic
* numeric.c (rb_int_{uminus,plus,minus,mul,idiv,modulo}): basic
  arithmetic functions for generic Integers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-26 01:54:16 +00:00
nobu ed47a0ec80 numeric.c: Fixnum predicts
* numeric.c (FIXNUM_{POSITIVE,NEGATIVE,ZERO}_P): predict macros
  only for Fixnum.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-26 01:52:00 +00:00
nobu 3f519a7bfa compile.c: explicit address
* compile.c (prepare_compile_error): add & to explicit address of
  functions to suppress warnings by old VC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-26 01:34:35 +00:00
naruse 08b08c1f27 use more suitable ticket [Bug #12218]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-25 21:44:26 +00:00
naruse 4e637adef8 Add patch author of r54291
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-25 21:40:49 +00:00
naruse 2709170e96 * localeinit.c (rb_locale_charmap_index): fix prototype. [Bug #12118]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-25 21:35:39 +00:00
svn b4843d9a52 * 2016-03-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-25 15:12:26 +00:00
usa 38dc45ba29 * ChangeLog: [ci skip] correct a mail address. cf. [Bug #11870]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-25 15:12:25 +00:00
duerst 8006157cba * test/ruby/enc/test_case_mapping.rb: Additional tests title case;
some not yet activated.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-25 07:40:49 +00:00
nobu b20b9e0afe openssl: fix build when NPN is disabled by OpenSSL
* ext/openssl/extconf.rb: check SSL_CTX_set_next_proto_select_cb
  function rather than OPENSSL_NPN_NEGOTIATED macro. it exists
  even if it is disabled by OpenSSL configuration.
  [ruby-core:74384] [Bug #12182]
* ext/openssl/ossl_ssl.c: update #ifdef(s) as above.
* test/openssl/test_ssl.rb: skip NPN tests if NPN is disabled.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-25 04:38:13 +00:00
nobu 1ac12c4056 fix URI::HTTP.new example
* lib/uri/http.rb (URI::HTTP#initialize): [DOC] fix example,
  missing mandatory arguments.  [ruby-core:74540] [Bug #12215]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-25 02:08:39 +00:00
naruse 88291c190a * thread_pthread.c (reserve_stack): fix reserving position where
the stack growing bottom to top. [Bug #12118]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 16:51:30 +00:00
nobu 22f1db4b8e mkmf: Unquote directory strings
* lib/mkmf.rb (find_executable0): On Windows, it is actually valid
  to surround individual PATH directory entries with double
  quotes. Remove these before joining the path as otherwise the
  literal quotes would become part of the path, resulting in the
  executable not to be found.  [Fix GH-1305]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 16:10:43 +00:00
nobu e7e0eeb084 test_find_executable.rb: each_exts
* test/mkmf/test_find_executable.rb (each_exts): extract common
  setup.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 16:04:51 +00:00
nobu dc54e38041 strftime.c: Bignum conversion
* strftime.c (format_value): convert from Bignum to String,
  instead of rb_str_format.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 15:49:43 +00:00
nobu 2460214780 strftime.c: set buffer length
* strftime.c (FMTV): set the buffer length before appending to
  keep just put part.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 15:12:56 +00:00
svn f4f7d49705 * 2016-03-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 15:01:40 +00:00
nobu 7d488c4e4e strftime.c: refine r54248
* strftime.c (FMT_PRECISION): eliminate side effects.
  [Bug #12213]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 15:01:39 +00:00
nobu 5c233dcd40 ChangeLog: remove duplicate entry [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 13:39:42 +00:00
nobu 20215f0181 strftime.c: remove recursive-assignments
* strftime.c (FMT, FMTV): remove recursive-assignments to get rid
  of undefined behavior.  [ruby-core:74532] [Bug #12213]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 13:38:20 +00:00
nobu 743f2bf879 strftime.c: fix FMTV
* strftime.c (FMT_PADDING): extract format for padding.
* strftime.c (FMT_PRECISION): extract precision formula.
* strftime.c (FMTV): append formatted string to expand the result.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 08:44:03 +00:00
nobu 44a247c745 strftime.c: case conversion
* strftime.c (STRFTIME): deal with case conversion flags for
  recursive formats.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 05:20:22 +00:00
nobu 0f4c580b20 date_core.c: unused variable
* ext/date/date_core.c (dt_lite_jisx0301): remove no longer used
  variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 04:27:35 +00:00
nobu 8d23c8bf3b date_core.c: append strings
* ext/date/date_core.c (dt_lite_iso8601): strftimev() always
  returns a String, so append them directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 03:43:28 +00:00
nobu c85040d4d0 date_core.c: fix jisx0301 and iso8601
* ext/date/date_core.c (d_lite_jisx0301, iso8601_timediv),
  (dt_lite_jisx0301): format by the format string in local buffer
  to prevent intermediate strings from GC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 03:43:06 +00:00
nobu c4f51b71e3 date_core.c: fix inspect
* ext/date/date_core.c (mk_inspect_raw, mk_inspect): inspect by
  "%+"PRIsVALUE, to prevent intermediate strings from GC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 03:42:37 +00:00
svn ec3d895094 * 2016-03-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 02:43:35 +00:00
nobu f3de12aa6b strftime.c: fix false failure
* strftime.c (rb_strftime_with_timespec): remove unnecessary
  check, as `s` equals to `endp` when recursed STRFTIME resized
  the capacity same as the size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-24 02:43:34 +00:00
mrkn aeb0be6ad5 * enum.c (ary_inject_op): put subtract operation out of if-clause.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-23 12:50:24 +00:00
mrkn e324d29e2b * enum.c (ary_inject_op): Use Kahan's compensated summation algorithm
for summing up float values.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-23 12:41:00 +00:00
nobu 5396d8a1ab strftime.c: format in String
* strftime.c (rb_strftime_with_timespec): append formatted results
  to the given string with expanding, and also deal with NUL chars.
* strftime.c (rb_strftime, rb_strftime_timespec): return formatted
  string, not the length put in the given buffer.
* time.c (rb_strftime_alloc): no longer needs to retry with
  reallocating buffers.
* time.c (time_strftime): no longer needs to split by NUL chars.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-23 11:57:01 +00:00
naruse 63436b3ff2 * lib/rdoc/ri/driver.rb (interactive): rescue NotFoundError raised in
expand_name. (display_name rescues NotFoundError by itself,
  the original logic looks buggy...)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-23 05:25:29 +00:00
nobu 7bfeb1c2ae remove SIGN_EXTEND_CHAR macro
* marshal.c (r_long): cast to `signed char`, which is used
  already, instead of SIGN_EXTEND_CHAR.
* parse.y: SIGN_EXTEND_CHAR is no longer used.  [Fix GH-1302]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-23 02:44:54 +00:00
nobu 6c8efc0dc7 GNUmakefile.in: fix MSYS2_ARG_CONV_EXCL
* cygwin/GNUmakefile.in (MSYS2_ARG_CONV_EXCL_PARAM):
  * add missing parentheses and remove double quotes.
  * rename to get rid of recursive references.
  * as --excludes-dir option is for a path name, its argument
    should be converted.
  [ruby-dev:49526] [Bug #12199]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-23 02:38:49 +00:00
svn ea6372de7f * 2016-03-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-23 01:39:42 +00:00
hsbt b33841b32a * variable.c: Added documentation about order of `Module#constants`
[ci skip][Bug #12121][ruby-dev:49505][fix GH-1301]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-23 01:39:41 +00:00
svn d864828fb4 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-22 12:08:31 +00:00
duerst 2f455ceca4 * include/ruby/oniguruma.h: Additional flag for characters that are titlecase.
* enc/unicode/case-folding.rb, casefold.h: Using above flag in data.
* enc/unicode.c: Marking capitalized character as unmodified if it is
  already titlecase.
* test/ruby/enc/test_case_mapping.rb: Tests for above functionality.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-22 12:08:30 +00:00
nobu bf99f85941 parse.y: lambda indentation check
* parse.y (lambda_body, parser_yylex): warn mismatched indentation
  of lambda block.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-22 05:19:01 +00:00
nobu 8c22a641d9 test_rubyoptions.rb: other indentation checks
* test/ruby/test_rubyoptions.rb (test_indentation_check): assert
  warnings against other keyword mismatches.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-22 05:13:55 +00:00
usa 15af93fcc8 * time.c (wmul): wrong condition.
fixed many test failures on 32bit and LLP64 platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-22 02:41:24 +00:00
usa 6957898ad0 * time.c (wdiv, wmod): wdivmod0() assumes the 3rd and the 4th arguments
are valid pointers.
  maybe checking them in wdivmod0() is better manner, but I guess that
  passing real dummy pointers may be faster than checking and branching
  in wdivmod0().
  this commit fixes SEGV on 32bit and LLP64 platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-22 01:37:01 +00:00
usa 0dbbcdb6bb * time.c (divmodv): void function never returns any value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-22 01:24:55 +00:00