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

49314 Коммитов

Автор SHA1 Сообщение Дата
nobu 05d4ee8630 prelude.rb: block passing
* 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-25 03:25:45 +00:00
kazu 1ef1557896 NEWS: Fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 03:01:07 +00:00
nobu d66f2d4443 prelude.c.tmpl: static literals
* 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-25 02:42:13 +00:00
nobu d9c76c5bd8 prelude.c.tmpl: fix optimization options
* 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
2017-12-25 02:09:14 +00:00
hsbt 6c71bdbc85 Added gemification entry to NEWS file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 00:33:19 +00:00
ko1 360c00572f Set first line numbers for empty iseqs.
* compile.c (iseq_compile_each): for empty method, block and so on,
  `last_line` is not set so that line number of `putnil` instruction
  will be zero. This patch set `first_lineno` for such `putnil`.

  Problem is reported by deivid-rodriguez via Yuichiro Kaneko.

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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 00:27:17 +00:00
sorah 7361587fff NEWS: use of copy_file_range(2) isn't a new method
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 17:55:01 +00:00
k0kubun 6ea6e972b2 NEWS: move the section to note ERB performance
I heard that notable performance improvements should be written to
"Implementation Improvements". So I put the sentence here.

Also, the sentence itself is fixed to be the same as Ruby 2.5 release
note draft's one.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 17:20:04 +00:00
ko1 cbac40b3e5 Remove "trace_instruction" compile option.
* iseq.h (rb_compile_option_struct): trace instruction is removed so that
  remove the trace_instruction compile option.
  Don't show warning (just ignore) for Ruby 2.5.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 17:07:53 +00:00
svn 973e39a309 * 2017-12-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 16:43:17 +00:00
k0kubun 6915ffc99d NEWS: note about ERB's rendering performance
improvement.

There is no specific ticket for it, but improving the ERB's performance
was my largest passion that made me a Ruby committer.

See r58735, r58842, r58904, r58905, r58916.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 16:43:17 +00:00
mame 6585043231 NEWS: Add a brief explanation for branch and method coverage
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 14:52:23 +00:00
nobu 874da405bd fix grammatical mistake [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 10:12:21 +00:00
normal 5461fa37bd NEWS: updates for WEBrick [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 08:45:21 +00:00
normal acdbb5c0ec NEWS: fix typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 08:40:11 +00:00
normal 7d10b978c3 webrick 1.4.2
This release removes uses of Kernel#open to avoid unintended
behaviors and make future auditing easier. [Misc #14216]

6 changes since 1.4.1:

      webrick: httpauth requires regular files
      webrick/httpservlet/cgi_runner.rb: remove unnecessary open
      webrick: WEBrick::Log requires path arg when given string
      webrick/httpservlet/*handler: use File.open
      webrick/httputils: note Kernel#open behavior
      webrick/httpservelet/cgi_runner: avoid IO#reopen on pathname

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 08:38:43 +00:00
mrkn 1b0b42dbd9 NEWS: update for bigdecimal 1.3.4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 06:24:57 +00:00
mrkn ea68278fe3 bigdecimal: version 1.3.4
Import bigdecimal version 1.3.4.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.3...v1.3.4

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 06:22:41 +00:00
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