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

59229 Коммитов

Автор SHA1 Сообщение Дата
Kazuhiro NISHIYAMA 777973084e
Add tests of argument forwarding's parameters and inspect 2019-11-20 17:57:52 +09:00
aycabta 633625a083 Mintty on Cygwin isn't a kind of command prompt, can process ANSI escape code 2019-11-20 17:55:19 +09:00
Koichi Sasada ae818b589e add a NEWS entry for Method#inspect 2019-11-20 17:21:50 +09:00
Nobuyoshi Nakada fc22b0eaa3
Always forward declaration is needed
`rb_resolve_refined_method_callable` is referenced in
`refine_sym_proc_call`, even when pre-compiling mjit header on
mswin.
2019-11-20 16:28:18 +09:00
Nobuyoshi Nakada 83900528ad
Turn C4047 warning into error
Warned at making precompiled header on mswin.

```
building rb_mjit_header-2.7.0.pch
vm.c
d:\a\ruby\ruby\src\vm_args.c(1117): warning C4047: '=': 'const rb_callable_method_entry_t *' differs in levels of indirection from 'int'
rb_mjit_header-2.7.0.pch updated
```
2019-11-20 16:28:18 +09:00
卜部昌平 7608baf92a re-add function prototypes
This commit reverts a part of 0e8219f591
which broke icc.  See also https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-master/log/20191120T010006Z.fail.html.gz
2019-11-20 15:54:06 +09:00
Nobuyoshi Nakada f90b22e3dc
Revert the line for nextafter.c for FreeBSD make 2019-11-20 15:37:05 +09:00
zverok 50cc934145 Update representation (discussed on ruby tracker) 2019-11-20 13:42:56 +09:00
zverok baf482bab4 Fix test_module.rb 2019-11-20 13:42:56 +09:00
zverok 4b583cff97 Method parameters inspect
Example:

    def m(a, b=nil, *c, d:, e: nil, **rest, &block)
    end
    p method(:m)
    #=> #<Method: m(a, b=<default>, *c, d:, e: <default>, **rest, &block) ...>
2019-11-20 13:42:56 +09:00
aycabta da0d7211aa Fix indent of a line when a newline is inserted to the next 2019-11-20 10:04:41 +09:00
aycabta 9306602f24 Replace typo "bock" with "block" 2019-11-20 09:58:33 +09:00
aycabta 19a310b0ac A preceding token of "do" of block has EXPR_CMDARG or EXPR_ENDFN
meth do # the preceding token of "do" has EXPR_CMDARG
  end

  meth() do # the preceding token of "do" has EXPR_ENDFN
  end
2019-11-20 09:56:13 +09:00
aycabta 49b4507fd3 Number sign comment (# bla bla) is a kind of newline character 2019-11-20 08:39:43 +09:00
aycabta bc0da8e3ff Generate history file path correctly when $HOME/.irbrc doesn't exist 2019-11-20 08:19:58 +09:00
Kazuki Tsujimoto ff41663403
Fix memory corruption in Enumerable#reverse_each [ruby-dev:50867] [Bug #16354] 2019-11-19 15:35:14 -06:00
Nobuyoshi Nakada 61131edba7
Revert "[ripper] Quoted label without expression must be a local variable"
This reverts commit 0b8c73aa65, which
seems breaking RVALUE consistency check.
2019-11-20 00:56:04 +09:00
git f3c9803528 * 2019-11-20 [ci skip] 2019-11-20 00:07:26 +09:00
Kazuki Tsujimoto 2439948bcc
Avoid needless object allocation 2019-11-19 08:53:01 -06:00
Kazuhiro NISHIYAMA 822d7ae316
Add a test
and rename from b.rb

[ruby-core:95055] [Bug #16177]
2019-11-19 17:36:47 +09:00
Nobuyoshi Nakada 0b8c73aa65
[ripper] Quoted label without expression must be a local variable 2019-11-19 17:18:27 +09:00
Koichi Sasada a5fe08fdd9 care about TAG_FATAL.
TAG_FATAL represents interpreter closing state and ec->errinfo
contains FIXNUM (eTerminateSignal, etc). If we need to change the
state, then errinfo is also changed because TAG_RAISE assumes that
ec->errinfo contains a Exception object.

Without this patch, TAG_FATAL is ignored and no ec->errinfo change
so that it causes critical issue.
[Bug #16177]
2019-11-19 16:56:56 +09:00
Nobuyoshi Nakada c53aec73dd
Configure static extensions only if in charge
Get rid of races in parallel configuration when using the
ext/Setup file.
2019-11-19 15:11:41 +09:00
卜部昌平 f6239ce0fc peep-hole optimize VM instructions
Some minor optimizations.

Calculating -------------------------------------
                           ours       trunk
          vm2_regexp     8.479M      8.346M i/s -      6.000M times in 0.707612s 0.718916s
   vm2_regexp_invert     8.605M      8.350M i/s -      6.000M times in 0.697298s 0.718576s

Comparison:
                       vm2_regexp
                ours:   8479223.3 i/s
               trunk:   8345893.8 i/s - 1.02x  slower

                vm2_regexp_invert
                ours:   8604647.4 i/s
               trunk:   8349852.8 i/s - 1.03x  slower

Calculating -------------------------------------
                           ours+jit   trunk+jit
Optcarrot Lan_Master.nes     68.603      64.167 fps

Comparison:
             Optcarrot Lan_Master.nes
                ours+jit:        68.6 fps
               trunk+jit:        64.2 fps - 1.07x  slower
2019-11-19 13:56:13 +09:00
Kazuhiro NISHIYAMA 75e8dd58f6
Remove TEST_BUNDLED_GEMS_ALLOW_FAILURES
https://github.com/seattlerb/minitest/pull/798 is closed
2019-11-19 13:06:40 +09:00
卜部昌平 0e8219f591 make functions static
These functions are used from within a compilation unit so we can
make them static, for better binary size.  This changeset reduces
the size of generated ruby binary from 26,590,128 bytes to
26,584,472 bytes on my macihne.
2019-11-19 12:36:19 +09:00
Samuel Williams 78e266da1d
Clarify documentation for `InstructionSequence#compile`.
We incorrectly assumed that the `file` argument should be the file name and
caused https://github.com/scoutapp/scout_apm_ruby/issues/307 because
exception backtrace did not contain correct path. This documentation
clarifies the role of the different arguments and provides extra
examples.
2019-11-19 11:40:00 +09:00
Nobuyoshi Nakada cef9ebfbd3 Suppress `stty` error on Apple Terminal
`stty` called in `Reline::ANSI.deprep` command shows the following
error message on macOS Apple Terminal, with some settings.

```
$ LANG=C irb
irb(main):001:0>
stty: 'standard input': unable to perform all requested operations
stty: 'standard input': unable to perform all requested operations
```
2019-11-19 02:39:02 +09:00
Nobuyoshi Nakada 473e314791 Prefer dedecated assertions 2019-11-19 02:38:56 +09:00
Takashi Kokubun 0be0d90ab0
pack is not using invokebuiltin anymore 2019-11-18 09:31:36 -08:00
Kazuhiro NISHIYAMA fea24bbfdb Fix glob base in bundler.gemspec 2019-11-19 00:29:10 +09:00
Kazuhiro NISHIYAMA 9aa75795f9 Skip some tests if extracted from tarball 2019-11-19 00:29:10 +09:00
Kazuhiro NISHIYAMA e9992bcab0 Allow unknown if ruby core 2019-11-19 00:29:10 +09:00
git 9067f43c0a * 2019-11-19 [ci skip] 2019-11-19 00:27:05 +09:00
Yusuke Endoh 0c0278b90a test/-ext-/string/test_fstring.rb: suppress a warning for taint 2019-11-18 09:25:49 -06:00
Yusuke Endoh 373769c939 NEWS: Add an example for the warning of "yield in singleton class" 2019-11-18 09:12:50 -06:00
Nobuyoshi Nakada f09fc1b034
Dependents on probes.h need the dummy header too 2019-11-18 23:16:22 +09:00
Nobuyoshi Nakada e1b2341488
Update dependencies 2019-11-18 23:16:22 +09:00
Nobuyoshi Nakada 39492d6ce6
Build ruby-runner 2019-11-18 18:42:40 +09:00
Nobuyoshi Nakada 227220b25a
Skip dependencies on timestamp files 2019-11-18 18:42:40 +09:00
Nobuyoshi Nakada 209164e44f
Renamed assembly file like as e64f71f812 2019-11-18 18:42:22 +09:00
卜部昌平 7a9b2039b7 delete unused codes
Suppress compiler warnings.
2019-11-18 18:28:03 +09:00
Koichi Sasada 57cd4623cf should not use __func__ 2019-11-18 13:53:32 +09:00
Nobuyoshi Nakada 22c9504905
rb_tainted_str_new_with_enc is no longer used 2019-11-18 11:05:22 +09:00
Koichi Sasada 5e34ab5406 add casts.
add casts to avoid compile error.
http://ci.rvm.jp/results/trunk_clang_39@silicon-docker/2402215
2019-11-18 10:36:48 +09:00
Koichi Sasada c3693bbaaa catch up last commit.
Array#pack uses `opt_invokebuiltin_delegate_leave` now.
2019-11-18 10:24:38 +09:00
Koichi Sasada 71fee9bc72 vm_invoke_builtin_delegate with start index.
opt_invokebuiltin_delegate and opt_invokebuiltin_delegate_leave
invokes builtin functions with same parameters of the method.
This technique eliminate stack push operations. However, delegation
parameters should be completely same as given parameters.
(e.g. `def foo(a, b, c) __builtin_foo(a, b, c)` is okay, but
__builtin_foo(b, c) is not allowed)

This patch relaxes this restriction. ISeq has a local variables
table which includes parameters. For example, the method defined
as `def foo(a, b, c) x=y=nil`, then local variables table contains
[a, b, c, x, y]. If calling builtin-function with arguments which
are sub-array of the lvar table, use opt_invokebuiltin_delegate
instruction with start index. For example, `__builtin_foo(b, c)`,
`__builtin_bar(c, x, y)` is okay, and so on.
2019-11-18 10:16:11 +09:00
Koichi Sasada 93ce4f1cd7 update deps.
https://travis-ci.org/ruby/ruby/jobs/613242256#L2205
2019-11-18 10:16:11 +09:00
git b753929806 * remove trailing spaces. [ci skip] 2019-11-18 08:00:52 +09:00
Jeremy Evans 4c7dc9fbe6 Update NEWS for $SAFE/taint changes 2019-11-18 01:00:25 +02:00