8000 Merge upstream Ruby by maximecb · Pull Request #42 · Shopify/yjit · GitHub
[go: up one dir, main page]

Skip to content

Merge upstream Ruby #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 108 commits into from
May 14, 2021
Merged

Merge upstream Ruby #42

merged 108 commits into from
May 14, 2021

Conversation

maximecb
Copy link
Contributor

No description provided.

mame and others added 30 commits May 7, 2021 17:02
... then, new_insn_core extracts nd_line(node).

Also, if a macro "EXPERIMENTAL_ISEQ_NODE_ID" is defined, this changeset
keeps nd_node_id(node) for each instruction. This is intended for
TypeProf to identify what AST::Node corresponds to each instruction.

This patch is originally authored by @yui-knk for showing which column a
NoMethodError occurred.

ruby/ruby@master...yui-knk:feature/node_id

Co-Authored-By: Yuichiro Kaneko <yui-knk@ruby-lang.org>
What's Here for class File
What's Here for class Dir
`[0, 1, 2, 3].max(6)` actually returns `[3,
8000
 2, 1, 0]`, but the doc said
it returns `[3, 2, 1]`.
Enhanced RDoc for Enumerable: #grep and #grep_v.
This should return 0, but on glibc it returned NaN.

Fixes [Bug #17804]
Not against having such thing but currently we lack one.
lib/bundler.gemspec and man/bundle-*,gemfile.* are now under the
directory lib/bundler/.
This function should be always available, as POSIX-compliant or
Windows platform are required since 1.9.  Also the code in this
file is MT-unsafe.
hsbt and others added 28 commits May 12, 2021 17:24
  Because test-unit didn't provide the benchmark test. And This test
  is fragile with the several environments.
`memsize_of(Object.new)` can be changed with past ivar creation
history for Object instances (another Object instance has 4 or
more ivars, next created Object instance has the area for the
ivars). So use antoher class for the comparison.
This change allows `def hello = puts "Hello"` without parentheses.

Note that `private def hello = puts "Hello"` does not parse for
technical reason.

[Feature #17398]
Essentially this reverts 45464bfcbdf9f9cfb440950bc57a27d237627a17.
The commit removed a mock of Time.now, which caused a random failure.

http://rubyci.s3.amazonaws.com/ubuntu1804/ruby-master/log/20210512T123004Z.fail.html.gz
```
  1) Failure:
TestGemPackageTarWriter#test_add_file_signer [/home/chkbuild/chkbuild/tmp/build/20210512T123004Z/ruby/test/rubygems/test_gem_package_tar_writer.rb:117]:
Field mtime of the tar header differs..
<"14046746312\u0000"> expected but was
<"14046746311\x00">.
```

Object#stub is defined at f1af59fe02ef2cc58f13e2742e4cc6cf8c2a1a20, so
now `Time.stub :now` works.

rubygems/rubygems@85f60a9ed0
Ruby uses a recursive algorithm for handling control/meta escapes
in strings (read_escape).  However, the equivalent code for regexps
(tokadd_escape) in did not use a recursive algorithm.  Due to this,
Handling of control/meta escapes in regexp did not have the same
behavior as in strings, leading to behavior such as the following
returning nil:

```ruby
/\c\xFF/ =~ "\c\xFF"
```

Switch the code for handling \c, \C and \M in literal regexps to
use the same code as for strings (read_escape), to keep behavior
consistent between the two.

Fixes [Bug #14367]
As well as `\u`, `\U` should be invalid there too.
And highlight including `u`/`U` not only the backslash before it.
@maximecb maximecb merged commit 941da2e into main May 14, 2021
@maximecb maximecb deleted the merge_upstream branch May 14, 2021 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0