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

46399 Коммитов

Автор SHA1 Сообщение Дата
nobu c4c3d86a1f zlib.c: zstream_buffer_ungetbyte
* ext/zlib/zlib.c (zstream_buffer_ungetbyte): simplify by using
  zstream_buffer_ungets().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01 00:35:02 +00:00
nobu 5f8ae91717 zlib.c: zstream_expand_buffer_non_stream
* ext/zlib/zlib.c (zstream_expand_buffer_non_stream): rename from
  zstream_expand_buffer_without_gvl() and replace duplicate code
  in zstream_expand_buffer().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01 00:35:00 +00:00
nobu fbb38d6d6a rational.c: canonicalization case
* rational.c (float_numerator, float_denominator): fix for
  canonicalization case where `Float#to_r` could return an Integer
  not a Rational.  although mathn.rb has been removed in the
  trunk, fix for the backport purpose.
  [ruby-core:80942] [Bug #13528]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-01 00:32:56 +00:00
svn 55e99ef5eb * 2017-05-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 21:18:31 +00:00
usa eb7817ad7e setup.mak have to handle `GIT` and `HAVE_GIT`
* win32/setup.mak: seems to be forgotten to commit at r58295.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 21:18:31 +00:00
usa 235a8214b1 Typo
* tool/generate-backport-changelog.rb: fixed a typo.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 13:34:18 +00:00
nobu e97e093a3d git-refresh: fix for Solaris
* tool/git-refresh: expand for each words.
  [ruby-dev:50102] [Bug #13522]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 10:53:42 +00:00
normal c4378e0fb8 thread_sync.c: document SizedQueue#clear correctly [ci skip]
* thread_sync.c (rb_szqueue_clear): fix class name in RDoc

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 09:06:39 +00:00
svn 2e486d8be9 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 07:24:37 +00:00
normal 8e147f1b0d new benchmark for SizedQueue
The performance of SizedQueue is a bit more complex than
regular Queue, so it deserves a separate benchmark.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 07:24:36 +00:00
svn 5a2c1ee353 * 2017-04-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 03:52:07 +00:00
nobu eeed8b96a1 git-refresh: fix for Solaris
* tool/git-refresh: unset variable `branch` if it is null, to get
  rid of substitutions which are not supported old Solaris.
  [ruby-dev:50102] [Bug #13522]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-30 03:52:06 +00:00
normal b7ad549654 load.c: remove a redundant rb_str_freeze call
rb_file_expand_path_fast already performs the buffer shrinking
rb_str_freeze does (via expand_path macro in file.c); the
result of rb_fstring is always frozen, and that rb_fstring
call is the last use of `expanded_path` in its scope.

load.c (rb_construct_expanded_load_path): remove rb_str_freeze

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-29 10:50:59 +00:00
nobu 8a7419814c proc.c: recursion loop
* proc.c (rb_block_min_max_arity, rb_method_entry_min_max_arity):
  turn loop by recursion into goto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-29 10:27:46 +00:00
svn 4bf532ad97 * 2017-04-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-29 02:58:54 +00:00
nobu c6c55bb784 node.h: sign-extend
* node.h (nd_line): should sign-extend.  shifting `VALUE` extends
  with zero bits if `sizeof(VALUE)` equals to `sizeof(int)`.  the
  zero bits are truncated if `sizeof(VALUE)` is bigger enough.
  [ruby-core:80920] [Bug #13523]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-29 02:58:53 +00:00
hsbt eb486f24e1 Bump version to gdbm-2.0.0.beta1
* Merge from ruby/gdbm.
  * gdbm gem is already registered in rubygems.org. I skip shipped
    version of 0.x and 1.x. Therefore We need to use 2.x.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-28 12:14:56 +00:00
nobu 99a105c82f sprintf.c: remove unused variable
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-28 11:42:58 +00:00
nobu 191be8057d parse.y: set_line_body is not used in ripper
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-28 09:50:43 +00:00
nobu 7d085cca4b parse.y: fix line in rescue
* parse.y (set_line_body, primary): fix line number of bodystmt as
  the beginning of the block.  [ruby-core:79388] [Bug #13181]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-28 08:06:33 +00:00
nobu efdc6d78ac sprintf.c: ruby_ultoa
* sprintf.c (ruby_ultoa): prefixed to get rid of conflict with
  a MSVC library function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-28 05:08:44 +00:00
nobu fb7c7d1e79 sprintf.c: format by utility functions
* sprintf.c (rb_str_format, fmt_setup): format by utility
  functions in vsnprintf.c instead of `snprintf`.

* sprintf.c (rb_str_format): format and append by `rb_str_catf`
  instead of formatting by `snprintf` and then copy.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-28 02:10:51 +00:00
svn cd9463849a * 2017-04-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-28 02:05:55 +00:00
nobu be2e146a55 sprintf.c: fix one-off bug
* sprintf.c (rb_str_format): `CHECK` just before `FILL_`, but
  after another `PUSH`.  fix one-off bug.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-28 02:05:54 +00:00
nobu 74a5dc5825 fix ripper prereq
* common.mk (ext/ripper/ripper.c): fix VPATH when out-of-place
  build, and id.h was created in the build directory too.  it has
  to include the build directory, i.e., the current directory
  before `cd`.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-27 12:30:55 +00:00
eregon acde55201b Send the backtrace of the circular require warning as a single String to Warning.warn
* load.c: send as a single string.
* error.c: expose the string formatted by rb_warning as rb_warning_string().
* test/ruby/test_exception.rb: update tests.
  [ruby-core:80850] [Bug #13505]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-27 12:07:43 +00:00
shyouhei 29ca20de2d refactor newhash (revision 58463 another try) [fix GH-1600]
* st.c (rb_hash_bulk_insert): new API to bulk insert entries
	  into a hash. Given arguments are first inserted into the
	  table at once, then reindexed. This is faster than inserting
	  things using rb_hash_aset() one by one.

	  This arrangement (rb_ prefixed function placed in st.c) is
	  unavoidable because it both touches table internal and write
	  barrier at once.

	* internal.h: delcare the new function.

	* hash.c (rb_hash_s_create): use the new function.

	* vm.c (core_hash_merge): ditto.

	* insns.def (newhash): ditto.

	* test/ruby/test_hash.rb: more coverage on hash creation.

	* test/ruby/test_literal.rb: ditto.

-----------------------------------------------------------
benchmark results:
minimum results in each 7 measurements.
Execution time (sec)
name    before  after
loop_whileloop2  0.136  0.137
vm2_bighash*     1.249  0.623

Speedup ratio: compare with the result of `before' (greater is better)
name    after
loop_whileloop2 0.996
vm2_bighash*    2.004



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-27 04:21:04 +00:00
normal 42c2df9937 load.c: make fstrings from C strings sooner
The underlying string objects will become fstrings anyways,
so create the fstring directly from the C string to reduce
intermediate garbage.

* load.c (rb_provide, rb_provide): create fstring

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-27 03:16:39 +00:00
nobu d249b047c2 error.c: send as a single string
* error.c (rb_warn_m): send the arguments as a single string
  concatenated with a newline, so it can be filtered easily.
  [ruby-core:80875] [Feature #12944]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-26 20:13:07 +00:00
svn 6a4061ce30 * 2017-04-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-26 20:09:35 +00:00
stomar d786797dbf error.c: improve docs
* error.c: [DOC] fix rdoc formatting (make sure `Warning.warn' is
  displayed verbatim; rdoc would render it as a link named `#warn'),
  use capitalized "Ruby", fix a typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-26 20:09:34 +00:00
nobu ec7833ef36 error.c: splat warn arguments
* error.c (rb_warn_m): print array arguments with splatting.
  it is often used with `caller`.
  [ruby-core:80849] [Feature #12944]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-26 08:11:32 +00:00
nobu 6c8852c1d3 range.c: remove no longer used variable
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-26 00:30:05 +00:00
normal 6e5e1b3728 thread_sync.c (rb_mutex_lock): spelling fix [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 20:20:08 +00:00
eregon c0fff4e0f6 Use require to load rbconfig in default.mspec
* Otherwise it would be loaded twice.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 19:34:07 +00:00
naruse 8a66d13535 suppress_warning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 19:13:26 +00:00
ko1 301d669a31 add timeout.
* test/ruby/test_trace.rb (test_trace_stackoverflow): sometimes this test
  was stopped forever and killed by test process forcibly. However, this
  test only checks if this code cause some critical failure such as SEGV.
  So that we can add timeout for this code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 17:50:34 +00:00
svn 44011ee041 * 2017-04-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 17:24:07 +00:00
ko1 de1a9d6565 revert r58478 and r58479 because they do not support not in-place build
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 17:24:06 +00:00
eregon fc8a2c2f46 Use require_relative to load rbconfig in default.mspec
* Otherwise it would load it twice.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 12:45:36 +00:00
eregon 6d98992111 No need to pass the config file to mspec as mspec finds it itself
* It would also #load (because .mspec cannot be #require'd) it twice.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 12:45:25 +00:00
eregon 7a7744a42f Remove useless else which produced a warning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 12:45:14 +00:00
eregon ead61f4ac8 no longer rescue exceptions of #<=> when initializing a Range
* range.c (range_init): no longer hide the user exception
  with a ArgumentError, just let the user exception go through.
* test/ruby/test_range.rb (test_new): add tests.
  [Feature #7688]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 11:42:43 +00:00
eregon 413cece5c9 no longer rescue exceptions of #coerce in Integer#step
* numeric.c (num_step_negative_p): no more error hiding.
* test/ruby/test_float.rb, test/ruby/test_numeric.rb:
  follow the change. [Feature #7688]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 11:42:31 +00:00
eregon bc1827e882 no longer rescue exceptions in numeric comparison operations
* numeric.c (do_coerce): no more error hiding.
* test/ruby/test_numeric.rb: follow the change.
  [Feature #7688]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 11:42:20 +00:00
hsbt 33f66084d5 Import gemspec
Import gemspec and test file from ruby/webrick.

  * webrick.gemspec: Update files and dependency for standalone gem.
  * test/webrick/utils.rb: Added explicitly loading of EnvUtil for
    test suite without ruby core test suite.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 09:23:04 +00:00
eregon 905d52772c Document the Warning module and warn method
* error.c (Warning): add documentation. [Feature #13504]
  Author: Jeremy Evans <code@jeremyevans.net>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 09:10:46 +00:00
nobu 5ad56e7c0b load.c: backtrace of circular require
* load.c (load_lock): print backtrace of circular require via
  `Warning.warn` [ruby-core:80850] [Bug #13505]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 08:17:24 +00:00
hsbt 0adeb1c8ab Import gemspec and test file changes from ruby/gdbm.
* gdbm.gemspec: Update basic configuraiton for standalone gdbm gem.
  * test/gdbm/test_gdbm.rb: In standalone environment, It needs to
    explicit loading of EnvUtil module for test suite.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 07:55:56 +00:00
svn 3c7785451e * 2017-04-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25 06:51:35 +00:00