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

49046 Коммитов

Автор SHA1 Сообщение Дата
kazu 9f68d0f591 [DOC] Improve example of IO#pread [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 02:41:00 +00:00
nobu 2e5cf0b711 compile.c: toplevel return arguments
* compile.c (compile_return): evaluate arguments to top-level
  return but ignore the results.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 02:38:27 +00:00
nobu c03c03cc11 lib/irb.rb: highlight exceptions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 02:26:22 +00:00
nobu 43e64b8585 lib/irb.rb: simplified backtrace filtering
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 01:52:21 +00:00
kazu 13247fa417 [DOC] Use File.open with block instead of File.new without close [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 01:26:46 +00:00
hsbt 9fe26ef8de Merge rdoc-6.0.1.
It fixes an installation error of activerecord.

  https://github.com/ruby/rdoc/issues/571

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 23:33:09 +00:00
sorah daaebaec79 Print backtrace in reverse order on IRB too
[Feature #8861]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 18:17:39 +00:00
svn 953385c6bc * 2017-12-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 16:17:57 +00:00
naruse 98bddfefc1 undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P on GCC 4.8
GCC 4.8 with optimization causes error if it compiles following code.
[Bug #14221]

```c
__builtin_choose_expr(__builtin_constant_p(b),0,1)
```

https://github.com/ruby/ruby/pull/1778

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 16:17:57 +00:00
ko1 0c8e6ae0b8 fix last commit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 14:48:28 +00:00
ko1 3044138bd7 RubyVM::InstructionSequence#trace_points.
* iseq.c (iseqw_trace_points): add `RubyVM::InstructionSequence#trace_points`
  method for tools which want to manipulate ISeq (and traces).

* test/ruby/test_iseq.rb: add a test for this method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 14:46:59 +00:00
nobu ac40fc997b test_io_console.rb: get rid of sporadic failures
* test/io/console/test_io_console.rb (test_getpass): try to get
  rid of timing issues.

* test/io/console/test_io_console.rb (test_ioflush2): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 14:31:56 +00:00
ko1 eb8c2773cb RubyVM::InstructionSequence#each_child.
* iseq.c (iseqw_each_child): add RubyVM::InstructionSequence#each_child
  method for tools which want to manipulate ISeq.

* test/ruby/test_iseq.rb: add a test for this method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 12:48:24 +00:00
ko1 919fa894f5 revert line number spec of *return events.
* compile.c (rb_iseq_compile_node): line number spec of :return, :b_return
  and :end events of 'TracePoint` is changed for [Feature #14104].

  Quoted from [Feature #14104]:
  > Line numbers on :return/:b_return events show the last executed lines,
  > instead of end lines (without return statement).
  Note that :end event also affected.

  However, "buybug", a well-known ruby debugger depends on previous behavior
  so that I reverted this specification.

* test/ruby/test_settracefunc.rb: catch up this fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 11:00:48 +00:00
k0kubun 1942e92547 iseq.c: show first_lineno on iseq inspect
My motivation was to improve the output of `ruby --dump=insns xxx.rb`.
When one file has many iseqs, it's hard to find the one I want to read.

So I wanted `iseq_disasm` to show first_lineno. I unified the behavior
of `iseqw_disasm` for consistency.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 09:10:34 +00:00
kazu a747834a69 iseq.c: Remove unused macro in r61395
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 01:53:48 +00:00
nobu 2a723132e9 iseq.c: local variable names
* iseq.c (rb_insn_operand_intern): simplified the condition for
  local variable names, assume TS_LINDEX and TS_NUM combinations
  are only for local variables.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 00:55:29 +00:00
nobu e3f46b1dc5 insns.def: adjust type
* insns.def (checkkeyword): adjust argument type to
  vm_check_keyword as lindex_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 00:51:36 +00:00
hsbt a1799f1f71 Avoid to warnings about gemspec loadings in rubygems tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 00:38:52 +00:00
svn d783148c7f * 2017-12-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 00:30:36 +00:00
nobu 1e85e42bde fix unicode data directory
* test/ruby/enc/test_regex_casefold.rb: fix searching unicode data
  directory, like as test_case_comprehensive.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-23 00:30:33 +00:00
hsbt 7825e8363d Postponing the Bundler merge.
I faced a big issue about Bundler with ruby core.
  I have no time to resolve it issue before 2.5 final release.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 23:08:05 +00:00
nobu 73bed03128 update unicode data files directory
* test/ruby/enc/test_case_comprehensive.rb: search ucd directory
  first if exists.

* test/ruby/enc/test_regex_casefold.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 12:39:32 +00:00
usa 52220154a8 force hash values fixable
* include/ruby/ruby.h (RB_ST2FIX): force fixable on LLP64 environment.

* hash.c (any_hash): ditto.
  [ruby-core:84395] [Bug #14218]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 08:52:11 +00:00
glass 072ed558d5 io.c: ignore EPERM
* io.c (nogvl_copy_file_range): ignore EPERM and fallback to
  sendfile(2) or read/write. copy_file_range(2) may not exist
  even if __NR_copy_file_range is defined in the build environment.
  [Bug #14207]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 08:47:39 +00:00
nobu 161f4a511a erb.rb: shadow by keys
* lib/erb.rb (ERB#new_toplevel): shadow already defined local
  variables by block local variabes, not to overwrite them.
  [ruby-core:84390] [Bug #14215]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 08:08:31 +00:00
hsbt 84e462758d Bump up fileutils-1.0.2
Added `FileUtils::VERSION` const variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 08:00:10 +00:00
normal 0d92f156b6 webrick/httpservelet/cgi_runner: avoid IO#reopen on pathname
IO#reopen seems to behave strangely on Win32 based on the logs
posted by Greg for [Bug #14420].  Lets try to fix the issue by
using File.open explicitly (but not Kernel#open).

* lib/webrick/httpservelet/cgi_runner: use File.open explicitly
  [Bug #14220]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 05:59:11 +00:00
ko1 14d44c8997 fix a test for debugging.
* test/rdoc/test_rdoc_markup_pre_process.rb: show
  `RDoc::Markup::PreProcess.post_processors` as a failure message
  for debugging.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 05:15:45 +00:00
kazu 6265a1a7b0 [DOC] StringIO#write accepts multiple arguments since r60377 [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 03:35:54 +00:00
kazu 8279699592 [DOC] Fix indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 03:35:52 +00:00
kazu 71749e26a5 [DOC] Remove unmatched parenthesis [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 03:35:46 +00:00
nobu 70001d5fda ifaddr.c: get_ifaddrs
* ext/socket/ifaddr.c (get_ifaddrs): extract ifaddrs from
  Socket::Ifaddr.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 01:49:00 +00:00
nobu 6e0074d0ff iseq.c (rb_insn_operand_intern): needs parenthesies
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 01:12:02 +00:00
normal f2aa7f409a webrick/httputils: note Kernel#open behavior
I don't know who uses the load_mime_types method; but it is
conceivable that a user would want to read the results of a
command instead of reading a regular file to load MIME types.

None of the WEBrick-related code in Ruby or default/bundled gems
seems to rely on this method; but it is likely 3rd-party code does.

* lib/webrick/httputils.rb (load_mime_types): note Kernel#open behavior
  [Misc #14216]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 01:08:05 +00:00
normal 1ad355bd53 webrick/httpservlet/*handler: use File.open
This makes future code audits easier.  None of these changes
fix realistic remote code execution vulnerabilities because
we stat(2) before attempting Kernel#open.

* lib/webrick/httpservlet/erbhandler.rb (do_GET): use File.open
* lib/webrick/httpservlet/filehandler.rb (do_GET): use File.open
  (make_partial_content): ditto
  [Misc #14216]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 01:08:00 +00:00
normal 1989371d10 webrick: WEBrick::Log requires path arg when given string
Allowing a user to specify "| command" via Kernel#open is
nonsensical since we never read from the resultant IO.

* lib/webrick/log.rb (initialize): replace Kernel#open with File.open
  [Misc #14216]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 01:07:55 +00:00
normal 1895a48856 webrick: add test for WEBrick::HTTPServlet::ERBHandler
This previously had no coverage.

* test/webrick/test_filehandler.rb (test_erbhandler): new test
* test/webrick/webrick.rhtml: new file for test
  [Misc #14216]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 01:07:50 +00:00
normal 646b83af2a webrick/httpservlet/cgi_runner.rb: remove unnecessary open
IO#reopen already takes string path names as well as IO objects
(but not "| command" strings)

This makes further auditing for inadvertant code execution
easier.  There's no actual bugfix or behavior change here,
as no external data is passed to cgi_runner.rb.

* lib/webrick/httpservlet/cgi_runner.rb: remove Kernel#open call
  [Misc #14216]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 01:07:45 +00:00
normal edddc28f62 webrick: httpauth requires regular files
Be sure we do not try to open a pipe to read from, since we care
about mtime in all cases.

* lib/webrick/httpauth/htdigest.rb: use File.open
* lib/webrick/httpauth/htgroup.rb: ditto
* lib/webrick/httpauth/htpasswd.rb: ditto
  [Misc #14216]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 01:07:39 +00:00
nobu e2479cc43f encoding.c: rb_enc_find_index2
* string.c (str_undump): use rb_enc_find_index2 to find encoding
  by unterminated string.  check the format before encoding name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 01:03:17 +00:00
nobu b4dc51ce10 iseq.c: defined insn operand
* iseq.c (rb_insn_operand_intern): improve operands of defined
  instruction.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-22 00:29:38 +00:00
svn 93dcc40bb7 * 2017-12-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 23:28:16 +00:00
shugo c55200763d Extend timeout for CI.
http://ci.rvm.jp/results/trunk-asserts-nopara@ruby-sky1/266962

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 23:28:15 +00:00
akr bf287424fd open-uri defines URI.open defined as an alias.
open-uri's Kernel.open will be deprecated in future.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 14:15:04 +00:00
nobu 7a54b5b4ce test for [Bug #14214]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 11:59:31 +00:00
hsbt 722306265d Added detailed version of Bundler on NEWS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 09:29:47 +00:00
eregon 82d63fcaac Simplify Thread#[]= spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 09:29:18 +00:00
hsbt 4525cf2cd5 Merge release version of bundler-1.16.1 from upstream.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 09:22:15 +00:00
ko1 85277d5be0 revert r61371 for [Bug #14214]
Reverted patch doesn't check overwritten value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-21 08:29:56 +00:00