| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to suppress the following warning:
```
compiling cxxanyargs.cpp
In file included from cxxanyargs.cpp:1:
In file included from ../../.././include/ruby/ruby.h:2150:
../../.././include/ruby/intern.h:56:19: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
^~~~~~~~~
../../.././include/ruby/intern.h:56:36: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
^~~~~~~~~
```
|
|
|
|
|
|
|
|
|
|
|
|
| |
```
$ ruby -ve 'IO.popen("ls"){}; $?.to_int'
ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-darwin18]
Traceback (most recent call last):
-e:1:in `<main>': undefined method `to_int' for #<Process::Status: pid 33989 SIGPIPE (signal 13)> (NoMethodError)
Did you mean? to_i
taint
```
Process::Status#to_int was removed at 7ba5c4e.
|
|
|
|
|
|
|
|
| |
This reverts commit a56d742e69aa8a3a1fe92fc515d93f6e51cf5fbc.
I was checking the CI result of the wrong revision. It actually worked
fine https://ci.appveyor.com/project/ruby/ruby/builds/27866303. Never
mind...
|
|
|
|
|
| |
For some reason the guard_not seems not working as expected
https://ci.appveyor.com/project/ruby/ruby/builds/27866153/job/v6wa6q6p7b7n7r37
|
| |
|
|
|
|
|
| |
for mswin. This spec is not valid for mswin platform.
https://ci.appveyor.com/project/ruby/ruby/builds/27748774/job/85khngfpc806m5lj
|
| |
|
|
|
|
|
| |
Also documents the non-*_kw functions if they were not already
documented.
|
| |
|
| |
|
|
|
| |
https://bugs.ruby-lang.org/issues/16234
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parsing of `RubyVM::InstructionSequence.compile` does not support an
outer scope currently. So it specified NULL as parent_iseq for the
parser. However, it resulted in the following false-positive warning.
```
RubyVM::InstructionSequence.compile(<<END)
o = Object.new
o #=> <compiled>:2: warning: possibly useless use of a variable in void context
END
```
This change specifies a dummy empty parent_iseq instead of NULL, which
suppresses the false positive.
|
|
|
|
| |
typedef was not declared in parse.y. Sorry.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The parser needs to determine whether a local varaiable is defined or
not in outer scope. For the sake, "base_block" field has kept the outer
block.
However, the whole block was actually unneeded; the parser used only
base_block->iseq.
So, this change lets parser_params have the iseq directly, instead of
the whole block.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The relation between parser_param#base_block and #in_main were very
subtle.
A main script (that is passed via a command line) was parsed under
base_block = TOPLEVEL_BINDING and in_main = 1.
A script loaded by Kernel#require was parsed under
base_block = NULL and in_main = 0.
If base_block is non-NULL and in_main == 0, it is parsed by Kernel#eval
or family.
However, we know that TOPLEVEL_BINDING has no local variables when a
main script is parsed. So, we don't have to parse a main script under
base_block = TOPLEVEL_BINDING.
Instead, this change parses a main script under base_block = 0.
If base_block is non-NULL, it is parsed by Kernel#eval or family.
By this simplication, "in_main" is no longer needed.
|
|
|
|
|
| |
Align mtime of files updated by `make prepare-package` to make
packages reproducible.
|
| |
|
|
|
|
| |
To get rid of setting mode and mtime of the original cache files.
|
|
|
|
|
|
| |
* Use the given branch name instead of implicit 'HEAD".
* Format like as git-svn when `from` or `to` is SVN revision
number.
|
|
|
|
| |
https://github.com/ruby/fileutils/commit/ba2c24e2d7
|
|
|
|
| |
https://github.com/ruby/fileutils/commit/f16f5a0dd6
|
|
|
|
|
| |
Implemented fine-grained inspection of cache misshits. Handy for
counting the reasons why an inline method cache was evicted.
|
|
|
|
|
| |
This one allocation of Method object is worth avoiding. We don't
want to test UnboundMethod#bind right here. GC need not run.
|
|
|
|
|
|
|
|
|
| |
LGTM reports that the value assigned to local variable 'shared' is never
used:
https://lgtm.com/projects/g/ruby/ruby/snapshot/f319a5d064627c6641817ec2ed16b97b4d215148/files/misc/lldb_cruby.py#x6512c0281581a470:1
This problem was introduced in by the refactoring that took place in
7c496b6624f720d539e3c0b40f122a9422a13b99.
|
| |
|
|
|
|
|
| |
Tabs were expanded because previously the file did not have any tab indentation.
Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commits: 10d6a3aca7 8ba48c1b85 fba8627dc1 dd883de5ba
6c6a25feca 167e6b48f1 7cb96d41a5 3207979278 595b3c4fdd 1521f7cf89
c11c5e69ac cf33608203 3632a812c0 f56506be0d 86427a3219 .
The reason for the revert is that we observe ABA problem around
inline method cache. When a cache misshits, we search for a
method entry. And if the entry is identical to what was cached
before, we reuse the cache. But the commits we are reverting here
introduced situations where a method entry is freed, then the
identical memory region is used for another method entry. An
inline method cache cannot detect that ABA.
Here is a code that reproduce such situation:
```ruby
require 'prime'
class << Integer
alias org_sqrt sqrt
def sqrt(n)
raise
end
GC.stress = true
Prime.each(7*37){} rescue nil # <- Here we populate CC
class << Object.new; end
# These adjacent remove-then-alias maneuver
# frees a method entry, then immediately
# reuses it for another.
remove_method :sqrt
alias sqrt org_sqrt
end
Prime.each(7*37).to_a # <- SEGV
```
|
|
|
|
|
|
| |
return directly in class/module is an error, so return in
proc in class/module should also be an error. I believe the
previous behavior was an unintentional oversight during the
addition of top-level return in 2.4.
|
|
|
|
|
| |
On parallel test, there are additional tests because of implicit
checkers which are enabled on 84cbce3d88.
|
| |
|
|
|
|
|
|
|
|
|
| |
parallel test (`make test-all TESTS=-j8`) runs tests on specified
number of processes. However, some test checkers written in
`runner.rb` are not loaded. This fix enable these checkers on
parallel tests.
See also: https://github.com/ruby/ruby/pull/2508
|
|
|
|
| |
RUBY_ISEQ_DUMP_DEBUG=to_binary and the attached test case was failing.
Dump the flag to make sure `**nil` can round-trip properly.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
I thought default branch's workflow runs on any tags,
but it does not run for stable branches without draft-release.yml.
So I abandoned, and use workflow in ruby/actions instead.
|
|
|
|
|
|
|
|
| |
This is a follow up to d9d4a28f1cdd05a0e8dabb36d747d40bbcc30f16.
The commit prevented CRLR, but did not address an isolated CR or an
isolated LF.
Co-Authored-By: NARUSE, Yui <naruse@airemix.jp>
|
|
|
|
|
| |
Create the substrings necessary parts only, instead of cutting the
rest of the buffer. Also removed a useless, probable typo, regexp.
|
|
|
|
|
| |
* dir.c (file_s_fnmatch): ensure that pattern does not contain a
NUL character. https://hackerone.com/reports/449617
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
If the keyword flag is set, there should be at least one argument,
if there isn't, that is a sign the keyword flag was passed when it
should not have been.
|
|
|
|
|
|
|
|
|
|
| |
Currently, there is not a way to create a sized enumerator in C
with a different set of arguments than provided by Ruby, and
correctly handle keyword arguments. This function allows that.
The need for this is fairly uncommon, but it occurs at least in
Enumerator.produce, which takes arugments from Ruby but calls
rb_enumeratorize_with_size with a different set of arguments.
|
|
|
|
| |
by explicitly removing the old definition.
|
|
|
|
| |
"in void context" by assigning the result to a dummy variable.
|
|
|
|
|
|
| |
This reverts commit c3b84f2de83a27acc638f99743bfa2c44bac621c.
Backtrace shows it is before running tests and debug check was
nonsense.
|
|
|
|
| |
callable_method_entry_p is for rb_callable_method_entry_t.
|