summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-29test/ruby/test_hash: minor test cleanupnormal
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-28* 2017-12-29svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28`$SAFE` as a process global state. [Feature #14250]ko1
* 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-28proc.c: empty iseq namesnobu
* 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-28erb.rb: let's remove constant deprecated at 2.5k0kubun
(r59497). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-28Fix KeyError#{key,receiver} of Thread#fetchkazu
[ruby-core:84508] [Bug #14247] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27remove empty spec/rubyspec directorynormal
* 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-27Update to ruby/spec@b95d7ederegon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27Update to ruby/spec@0fe33aceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27* 2017-12-28svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27Update to ruby/mspec@5f563e4eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27fix concurrent test.ko1
* 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-27fix fd mask detection on os xnobu
This was broken in r59440 (3215b27a9abd8de793cf517f32d8901fd421eb1c) [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-27tool/downloader.rb: don't suppress exceptionk0kubun
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-27tool/downloader.rb: retry downloadsk0kubun
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-27erb.rb: preserve the behavior for invalid syntaxk0kubun
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-27spec_helper.rb: libruby.so iff enable-sharednobu
* 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-27vm_eval.c: expanded eval_stringnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27vm_eval.c: split eval_string_with_crefnobu
* 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-27vm_eval.c: refactor eval_make_iseqnobu
* 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-27spec_helper.rb: must find libruby.sonobu
* 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-27fake.rb: set libdirnobu
* 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* 2017-12-27svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27[DOC] Fix typos in downcase [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26Add NEWS for Ruby 2.6.0kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26Move from NEWS to doc/NEWS-2.5.0kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26test_proc.rb: remove duplicate test_source_locationnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26vm_method.c: fix super in refined modulenobu
* 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-26parse.y: warning for locationsnobu
* 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-26vm_eval.c: strange message in evalnobu
* 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-26test/ruby/test_proc.rb: Add a test for Binding#source_locationmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26proc.c (bind_location): Add Binding#source_locationmame
Fixes #14230 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26variable.c: public rb_autoloadnobu
* 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-25prelude.c.tmpl: get rid of errors with old gccnobu
* 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* 2017-12-26svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25test/ruby/test_process.rb: get rid of timing issuenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25cont.c: fix comment to follow field name changek0kubun
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-25version.h (RUBY_VERSION): 2.6.0 development has started.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25hash.c: prime2nobu
* 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-25hash.c: use uint128_tnobu
* hash.c (mult_and_mix): use uint128_t instead of __uint128_t. [ruby-core:84438] [Bug #14231] From: Nobuyoshi Nakada <nobu@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25Use UINT128_T support flag from configurenobu
Current check for __uint128_t in hash.c is not valid, since it ignores compilers other than gcc. We hit this on lcc on e2k platform. Configure script properly checks from 128-bit data types support and sets HAVE_UINT128_T accordingly. This approach is already used within ruby at bignum.c, random.c, etc. Probably hash.c is an overlooked remnant of old days. This patch fixes this. [ruby-core:84438] [Bug #14231] [Fix GH-1781] From: Andrew Savchenko <bircoph@altlinux.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25Add ruby_2_5 branch to .travis.ymlnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25irb.rb: fix highlightnobu
* lib/irb.rb (IRB::Irb#eval_input): fix highlight for multiple lines exception messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25fix leaked fdsnobu
* lib/rubygems/command.rb (Gem::Command#invoke_with_build_args): restore UI and close the created SilentUI. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25doc/contributing.rdoc: Update platform maintainersmame
* mswin32 and Symbian OS are no longer supported * Mac OS X was renamed git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25Disasm output contains code range.ko1
* iseq.c (iseq_inspect): show also code range information. Note that `iseq_inspect` is used only for header of disasm. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25prelude.rb: block passingnobu
* prelude.rb (Thread.exclusive): pass the block as a block argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25NEWS: Fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25prelude.c.tmpl: static literalsnobu
* template/prelude.c.tmpl (PRELUDE_STR): make string objects with static literals not to copy them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25prelude.c.tmpl: fix optimization optionsnobu
* template/prelude.c.tmpl (prelude_eval): fix optimization options. trace_instruction member has been removed. filled coverage_enabled and debug_level members instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e