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

49271 Коммитов

Автор SHA1 Сообщение Дата
nobu 457521574c parse.y: assignable_error
* parse.y (assignable_gen): should return valid NODE always even
  on errors.  [ruby-core:84565] [Bug #14261]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-31 11:25:38 +00:00
nobu 59845bd47a parse.y: yylloc at yyerror
* parse.y (parser_yyerror): utilize the location given by bison.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-31 06:53:04 +00:00
ko1 fb112a8c4d fix reset order.
* lib/rdoc/test_case.rb (setup): call `RDoc::Markup::PreProcess.reset`
  at the end of `setup` method.
  `RDoc::RDoc.new` requires `rdoc/generator/darkfish`
  and requires `rdoc/tom_doc.rb` at last. It add post_proecssor
  (at `add_post_processor`) and it fails
  `TestRDocMarkupPreProcess#test_class_post_process`.
  This issue occured only with sorted tests by alphabetical order.
  `make test-all TESTS='rdoc/test_rdoc_markup_pre_process.rb --test-order=alpha`)
  We can observe this failure with parallel test only a few times.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-31 00:06:34 +00:00
ko1 a9170f0dc1 increase test timeout.
* test/ruby/test_thread.rb (test_signal_at_join): increase timeout.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-30 23:06:39 +00:00
svn 5c600fd547 * 2017-12-31
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-30 16:38:23 +00:00
ngoto 2adf281593 bit fields treating negative values should be declared as signed int
* internal.h (struct vm_ifunc_argc): Bit fields are unsigned by default.
  For storing nagative values to bit fields, they must be declated as
  signed int. Fix multiple test failure observed by 32-bit binaries
  compiled with Oracle Developer Studio (Solaris Studio) 12.x on
  Solaris 10 on sparc architecture. [Bug #14260]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-30 16:38:22 +00:00
mrkn f92924923d numeric.c: Fix Integer#pow with a large Fixnum modulo
* numeric.c: Fix Integer#pow with a large Fixnum modulo
  [Bug #14259] [ruby-core:84562]

* test/ruby/test_numeric.rb: add assertions for reproducing this bug.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-30 14:50:15 +00:00
nobu d83e02017e drb: use \A and \z
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-30 12:10:43 +00:00
svn ff9a3de4b3 * 2017-12-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-30 00:00:24 +00:00
normal fc939f6697 hash literal deduplicates like Hash#[]=
From: Eric Wong <e@80x24.org>

* hash.c (rb_hash_key_str): new function
  (hash_aset_str): use rb_hash_key_str
* internal.h: add rb_hash_key_str
* st.c (st_stringify): use rb_hash_key_str
* test/ruby/test_hash.rb (test_NEWHASH_fstring_key): dynamic key
  [ruby-core:84554] [Feature #14258]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-30 00:00:23 +00:00
nobu 634a48c5c1 string.c: chomp rs at the end
* string.c (rb_str_enumerate_lines): should chomp record separator
  only, but not a newline, at the end of the receiver as well as
  middle, if the separator is given.
  [ruby-core:84552] [Bug #14257]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-29 12:19:03 +00:00
normal 18640bf9f0 test/ruby/test_hash: minor test cleanup
Prep work for proposed behavior change:
https://bugs.ruby-lang.org/issues/14225

* test/ruby/test_hash.rb (test_tainted_string_key): assert_predicate

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-29 06:47:29 +00:00
svn ccbd6ee55a * 2017-12-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28 20:09:25 +00:00
ko1 c39bdb798d `$SAFE` as a process global state. [Feature #14250]
* vm_core.h (rb_vm_t): move `rb_execution_context_t::safe_level` to
  `rb_vm_t::safe_level_` because `$SAFE` is a process (VM) global state.

* vm_core.h (rb_proc_t): remove `rb_proc_t::safe_level` because `Proc`
  objects don't need to keep `$SAFE` at the creation.
  Also make `is_from_method` and `is_lambda` as 1 bit fields.

* cont.c (cont_restore_thread): no need to keep `$SAFE` for Continuation.

* eval.c (ruby_cleanup): use `rb_set_safe_level_force()` instead of access
  `vm->safe_level_` directly.

* eval_jump.c: End procs `END{}` doesn't keep `$SAFE`.

* proc.c (proc_dup): removed and introduce `rb_proc_dup` in vm.c.

* safe.c (rb_set_safe_level): don't check `$SAFE` 1 -> 0 changes.

* safe.c (safe_setter): use `rb_set_safe_level()`.

* thread.c (rb_thread_safe_level): `Thread#safe_level` returns `$SAFE`.
  It should be obsolete.

* transcode.c (load_transcoder_entry): `rb_safe_level()` only returns
  0 or 1 so that this check is not needed.

* vm.c (vm_proc_create_from_captured): don't need to keep `$SAFE` for Proc.

* vm.c (rb_proc_create): renamed to `proc_create`.

* vm.c (rb_proc_dup): moved from proc.c.

* vm.c (vm_invoke_proc): do not need to set and restore `$SAFE`
  for `Proc#call`.

* vm_eval.c (rb_eval_cmd): rename a local variable to represent clearer
  meaning.

* lib/drb/drb.rb: restore `$SAFE`.

* lib/erb.rb: restore `$SAFE`, too.

* test/lib/leakchecker.rb: check `$SAFE == 0` at the end of tests.

* test/rubygems/test_gem.rb: do not set `$SAFE = 1`.

* bootstraptest/test_proc.rb: catch up this change.

* spec/ruby/optional/capi/string_spec.rb: ditto.

* test/bigdecimal/test_bigdecimal.rb: ditto.

* test/fiddle/test_func.rb: ditto.

* test/fiddle/test_handle.rb: ditto.

* test/net/imap/test_imap_response_parser.rb: ditto.

* test/pathname/test_pathname.rb: ditto.

* test/readline/test_readline.rb: ditto.

* test/ruby/test_file.rb: ditto.

* test/ruby/test_optimization.rb: ditto.

* test/ruby/test_proc.rb: ditto.

* test/ruby/test_require.rb: ditto.

* test/ruby/test_thread.rb: ditto.

* test/rubygems/test_gem_specification.rb: ditto.

* test/test_tempfile.rb: ditto.

* test/test_tmpdir.rb: ditto.

* test/win32ole/test_win32ole.rb: ditto.

* test/win32ole/test_win32ole_event.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28 20:09:24 +00:00
nobu 67850e8a9e proc.c: empty iseq names
* proc.c (proc_binding): unified the name and realpath of an empty
  iseq.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28 08:28:42 +00:00
k0kubun 9006d059f4 erb.rb: let's remove constant deprecated at 2.5
(r59497).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28 05:07:16 +00:00
kazu 220d2a7182 Fix KeyError#{key,receiver} of Thread#fetch
[ruby-core:84508] [Bug #14247]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28 00:00:05 +00:00
normal 5b94fc9601 remove empty spec/rubyspec directory
* spec/rubyspec: remove empty directory trees
  [ruby-core:84533]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 23:40:43 +00:00
eregon 74f14d6921 Update to ruby/spec@b95d7ed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 21:18:20 +00:00
eregon a34db218ad Update to ruby/spec@0fe33ac
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 16:12:47 +00:00
svn 0f989b87a0 * 2017-12-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 16:12:19 +00:00
eregon 76402dfa06 Update to ruby/mspec@5f563e4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 16:12:18 +00:00
ko1 f8fac84c7b fix concurrent test.
* test/rubygems/test_require.rb (test_concurrent_require):
  Synchronizations should be in ensure clause. Sometimes
  `require` fails (not sure why) and latch is not released.
  Such case introduces unlimited awaiting.
  This patch soleve this problem.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 14:50:49 +00:00
nobu ecbb128273 fix fd mask detection on os x
This was broken in r59440 (3215b27a9a)
[Bug #14248]

From: Stefan Kaes <skaes@railsexpress.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 14:07:49 +00:00
k0kubun 57e95f38b1 tool/downloader.rb: don't suppress exception
on the end of retry failure.

Fixed mistake in r61498

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 13:35:25 +00:00
k0kubun ff6c540adb tool/downloader.rb: retry downloads
because it's randomly failing on CI like
https://ci.appveyor.com/project/ruby/ruby/build/1.0.6724

Actually I'm not sure whether the exception class is Errno::ECONNREFUSED
or not. Please change the rescued exception to the correct one if it's
wrong. I changed to log exception class too in this commit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 13:32:59 +00:00
k0kubun c46d3de0f5 erb.rb: preserve the behavior for invalid syntax
comment. Fix regression at r58948.

I even don't want to deprecate it because deprecation needs to lex all
embedded Ruby script using Ripper and it would be slow.  So Let me just
keep this behavior of Ruby 2.4. No change is the best compatibility.

This commit stopped using String#-@ because it's harmful for "ambiguous
first argument" warning if we really want to maintain this behavior.

[Bug #14243]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 12:40:03 +00:00
nobu e1f834f9b4 spec_helper.rb: libruby.so iff enable-shared
* spec/ruby/optional/capi/spec_helper.rb (compile_extension):
  search libruby.so only when enable-shared.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 07:28:32 +00:00
nobu 8224002b81 vm_eval.c: expanded eval_string
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 03:00:30 +00:00
nobu ed6680c1df vm_eval.c: split eval_string_with_cref
* vm_eval.c (eval_string_with_cref): split into cref and scope
  modes, which are exclusive.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 02:55:16 +00:00
nobu 5f0dca59a3 vm_eval.c: refactor eval_make_iseq
* vm_eval.c (eval_make_iseq): moved preparations of location and
  debug print.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 02:55:15 +00:00
nobu a1695d9c2c spec_helper.rb: must find libruby.so
* spec/ruby/optional/capi/spec_helper.rb (compile_extension): if
  libruby.so should have been built but is not found, fail early.
  get mtime of the library just once.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 01:58:18 +00:00
nobu 42c6ef00af fake.rb: set libdir
* tool/fake.rb: set "libdir" to build directory too, so that
  spec/ruby/optional/capi/spec_helper.rb can find libruby_so.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 01:26:22 +00:00
svn 79487218dd * 2017-12-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 00:04:30 +00:00
kazu c9bdee3e0d [DOC] Fix typos in downcase [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 00:04:30 +00:00
kazu 94fdb5e1d2 Add NEWS for Ruby 2.6.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 11:36:07 +00:00
kazu 8be1c6523d Move from NEWS to doc/NEWS-2.5.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 11:35:48 +00:00
nobu 60578d061a test_proc.rb: remove duplicate test_source_location
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 10:40:48 +00:00
nobu e973bde0d0 vm_method.c: fix super in refined module
* vm_method.c (rb_method_entry_complement_defined_class): clone
  the original method entry of refined module instance method with
  the active ICLASS, to track super method chain.
  [ruby-dev:50390] [Bug #14232]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 10:32:58 +00:00
nobu 3802fb92ff parse.y: warning for locations
* parse.y (gettable_gen): warn for __FILE__/__LINE__ when eval
  with binding only.  promote use of Binding#source_location
  instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 10:10:41 +00:00
nobu 62a3e7a33b vm_eval.c: strange message in eval
* vm_eval.c (eval_string_with_cref): remove unnecessary location
  from exception backtrace in eval.
  [ruby-core:84434] [Bug #14229]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 09:05:28 +00:00
mame 9e717416b4 test/ruby/test_proc.rb: Add a test for Binding#source_location
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 09:04:26 +00:00
mame 571e48b744 proc.c (bind_location): Add Binding#source_location
Fixes #14230

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 08:38:35 +00:00
nobu f6631c3096 variable.c: public rb_autoload
* variable.c (rb_autoload): restore the visibility for backward
  compatibility.  [ruby-core:84454] [Bug #14236]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 05:30:31 +00:00
nobu de11e472b4 prelude.c.tmpl: get rid of errors with old gcc
* template/prelude.c.tmpl: moved diagnostic pragmas outside
  prelude_eval() for very old gcc.  [ruby-core:84449] [Bug #14234]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 23:59:56 +00:00
svn fff3fd9a83 * 2017-12-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 23:33:53 +00:00
nobu 67fd07738d test/ruby/test_process.rb: get rid of timing issue
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 23:33:52 +00:00
k0kubun 65d3461e95 cont.c: fix comment to follow field name change
saved_thread was renamed to saved_ec in r59831 [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 14:22:21 +00:00
matz 0af050993e version.h (RUBY_VERSION): 2.6.0 development has started.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 14:05:59 +00:00
nobu baa53f625d hash.c: prime2
* hash.c (prime2): turned into a uint32_t prime, as the lower
  32bits, non-prime part only was used always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 12:41:52 +00:00