Takashi Kokubun
346aa557b3
Make opt_eq and opt_neq insns leaf
...
# Benchmark zero?
```
require 'benchmark/ips'
Numeric.class_eval do
def ruby_zero?
self == 0
end
end
Benchmark.ips do |x|
x.report('0.zero?') { 0.ruby_zero? }
x.report('1.zero?') { 1.ruby_zero? }
x.compare!
end
```
## VM
No significant impact for VM.
### before
ruby 2.7.0dev (2019-08-04T02:56:02Z master 2d8c037e97
) [x86_64-linux]
0.zero?: 21855445.5 i/s
1.zero?: 21770817.3 i/s - same-ish: difference falls within error
### after
ruby 2.7.0dev (2019-08-04T11:17:10Z opt-eq-leaf 6404bebd6a) [x86_64-linux]
1.zero?: 21958912.3 i/s
0.zero?: 21881625.9 i/s - same-ish: difference falls within error
## JIT
The performance improves about 1.23x.
### before
ruby 2.7.0dev (2019-08-04T02:56:02Z master 2d8c037e97
) +JIT [x86_64-linux]
0.zero?: 36343111.6 i/s
1.zero?: 36295153.3 i/s - same-ish: difference falls within error
### after
ruby 2.7.0dev (2019-08-04T11:17:10Z opt-eq-leaf 6404bebd6a) +JIT [x86_64-linux]
0.zero?: 44740467.2 i/s
1.zero?: 44363616.1 i/s - same-ish: difference falls within error
# Benchmark str == str / str != str
```
# frozen_string_literal: true
require 'benchmark/ips'
Benchmark.ips do |x|
x.report('a == a') { 'a' == 'a' }
x.report('a == b') { 'a' == 'b' }
x.report('a != a') { 'a' != 'a' }
x.report('a != b') { 'a' != 'b' }
x.compare!
end
```
## VM
No significant impact for VM.
### before
ruby 2.7.0dev (2019-08-04T02:56:02Z master 2d8c037e97
) [x86_64-linux]
a == a: 27286219.0 i/s
a != a: 24892389.5 i/s - 1.10x slower
a == b: 23623635.8 i/s - 1.16x slower
a != b: 21800958.0 i/s - 1.25x slower
### after
ruby 2.7.0dev (2019-08-04T11:17:10Z opt-eq-leaf 6404bebd6a) [x86_64-linux]
a == a: 27224016.2 i/s
a != a: 24490109.5 i/s - 1.11x slower
a == b: 23391052.4 i/s - 1.16x slower
a != b: 21811321.7 i/s - 1.25x slower
## JIT
The performance improves on JIT a little.
### before
ruby 2.7.0dev (2019-08-04T02:56:02Z master 2d8c037e97
) +JIT [x86_64-linux]
a == a: 42010674.7 i/s
a != a: 38920311.2 i/s - same-ish: difference falls within error
a == b: 32574262.2 i/s - 1.29x slower
a != b: 32099790.3 i/s - 1.31x slower
### after
ruby 2.7.0dev (2019-08-04T11:17:10Z opt-eq-leaf 6404bebd6a) +JIT [x86_64-linux]
a == a: 46902738.8 i/s
a != a: 43097258.6 i/s - 1.09x slower
a == b: 35822018.4 i/s - 1.31x slower
a != b: 33377257.8 i/s - 1.41x slower
This is needed towards Bug#15589.
Closes: https://github.com/ruby/ruby/pull/2318
2019-08-04 22:20:12 +09:00
Hiroshi SHIBATA
39622232c7
Suppress warnings of bundled libyaml.
2019-08-04 20:12:43 +09:00
Sutou Kouhei
2d8c037e97
[ruby/rexml] gemspec: update
...
https://github.com/ruby/rexml/commit/404bd99a7c
2019-08-04 11:56:02 +09:00
Kouhei Sutou
310a2a9860
[ruby/rexml] xpath: add missing value conversions for equality and relational expressions
...
GitHub: fix #18
Reported by Mirko Budszuhn. Thanks!!!
https://github.com/ruby/rexml/commit/0dca2a2ba0
2019-08-04 11:55:55 +09:00
Kouhei Sutou
39f275edf7
[ruby/rexml] xpath number: fix a bug that false is converted to NaN
...
GitHub: fix #18
It must be 0.
Reported by Mirko Budszuhn. Thanks!!!
https://github.com/ruby/rexml/commit/b48f3afa3b
2019-08-04 11:55:49 +09:00
Kouhei Sutou
643344dc94
[ruby/rexml] xpath local_name: fix a bug that nil is returned for nonexistent case
...
It must be an empty string.
https://github.com/ruby/rexml/commit/81bc7cd4f5
2019-08-04 11:55:43 +09:00
Kouhei Sutou
5f78b138b1
[ruby/rexml] xpath boolean: implement
...
https://github.com/ruby/rexml/commit/feb8ddb1ec
2019-08-04 11:55:37 +09:00
Kouhei Sutou
6ef8294397
[ruby/rexml] xpath: fix a bug for equality or relational expressions
...
GitHub: fix #17
There is a bug when they are used against node set. They should return
boolean value but they returned node set.
Reported by Mirko Budszuhn. Thanks!!!
https://github.com/ruby/rexml/commit/a02bf38440
2019-08-04 11:55:31 +09:00
Kouhei Sutou
c46ba8e9a3
[ruby/rexml] Use PP
...
https://github.com/ruby/rexml/commit/185062a4a4
2019-08-04 11:55:26 +09:00
Kouhei Sutou
54525fbfd4
[ruby/rexml] xpath: add support for changing to debug mode by environment variable
...
https://github.com/ruby/rexml/commit/59378a16ea
2019-08-04 11:55:20 +09:00
Kouhei Sutou
de55e0a008
[ruby/rexml] Bump version
...
https://github.com/ruby/rexml/commit/54452c103a
2019-08-04 11:55:14 +09:00
ujihisa
f85caf40a6
[ruby/rexml] Message less confusing error to human ( #16 )
...
* Message less confusing error to human
* Problem: Following error message is not helpful, because you have to reason
that '' actually means it's in the top-level, and the 'div' (not '</div>') is
an end tag
require "rexml/parsers/lightparser"
REXML::Parsers::LightParser.new('</div>').parse
#=> Missing end tag for '' (got 'div')
* Solution: add a special case in error handling just to change the error message
require "rexml/parsers/lightparser"
REXML::Parsers::LightParser.new('</div>').parse
#=> Unexpected top-level end tag (got 'div')
* Refactor by removing unnecessary `md` check
* Thanks @a_matsuda to review this at asakusa.rb!
https://github.com/ruby/rexml/commit/f6528d4477
2019-08-04 11:55:03 +09:00
Kouhei Sutou
33e4a59b4a
[ruby/rexml] test: compare with real element
...
https://github.com/ruby/rexml/commit/9f2908de2e
2019-08-04 11:54:57 +09:00
Alyssa Ross
ee8985ef0e
[ruby/rexml] Fix crash with nil XPath variables ( #13 )
...
Patch by Alyssa Ross. Thanks!!!
https://github.com/ruby/rexml/commit/2a53c54f58
2019-08-04 11:54:50 +09:00
FUJI Goro (gfx)
982208c650
[ruby/rexml] use #inspect to print meta-characters in error messages
...
https://github.com/ruby/rexml/commit/a124a19b9a
2019-08-04 11:54:44 +09:00
Kouhei Sutou
81354bbd1b
[ruby/rexml] Bump version
...
https://github.com/ruby/rexml/commit/c0e3f14564
2019-08-04 11:54:38 +09:00
Kouhei Sutou
0f18bc7fca
[ruby/rexml] Fix attribute's default namespace behavior
...
NOTE: It's a backward incompatible change. If we have any serious
problems with this change, we may revert this change.
The XML namespace specification says the default namespace doesn't
apply to attribute names but it does in REXML without this change:
https://www.w3.org/TR/xml-names/#uniqAttrs
> the default namespace does not apply to attribute names
REXML reports a parse error for the following XML that is described as
a valid XML in the XML nsmaspace specification without this change:
<!-- http://www.w3.org is bound to n1 and is the default -->
<x xmlns:n1="http://www.w3.org "
xmlns="http://www.w3.org " >
<good a="1" b="2" />
<good a="1" n1:a="2" />
</x>
If attribute doesn't have prefix, the attribute should return "" for
both #prefix and #namespace.
https://github.com/ruby/rexml/commit/9e4fd552bc
2019-08-04 11:54:27 +09:00
Kouhei Sutou
9b36f0a787
[ruby/rexml] Format
...
https://github.com/ruby/rexml/commit/2384586811
2019-08-04 11:54:22 +09:00
Kouhei Sutou
84c3742466
[ruby/rexml] Revert "xpath: remove needless nil check"
...
This reverts commit 61b73c1bf8dc64d97fba7f0a8c503c24b11313f5.
"*:local_name" becomes prefix=nil.
https://github.com/ruby/rexml/commit/9e7dd4cd4e
2019-08-04 11:54:16 +09:00
Kouhei Sutou
096e766355
[ruby/rexml] xpath: remove needless nil check
...
It must not be nil.
https://github.com/ruby/rexml/commit/61b73c1bf8
2019-08-04 11:54:11 +09:00
Kouhei Sutou
27c11892c8
[ruby/rexml] Add a TODO for Attribute#namespace
...
https://github.com/ruby/rexml/commit/70310a06e5
2019-08-04 11:54:05 +09:00
Kouhei Sutou
3583fa166c
[ruby/rexml] xpath: fix a bug that no namespace attribute isn't matched with prefix
...
[ruby-list:50733]
Reported by Yasuhiro KIMURA. Thanks!!!
https://github.com/ruby/rexml/commit/8f3c5c176a
2019-08-04 11:54:00 +09:00
Kouhei Sutou
f76cfb55d7
[ruby/rexml] Bump version
...
https://github.com/ruby/rexml/commit/0f79e71210
2019-08-04 11:53:49 +09:00
Takashi Kokubun
adfc8d6dba
Defer skip to avoid errors on ensure
2019-08-04 11:05:50 +09:00
Takashi Kokubun
7a75baa6e2
Skip test_race_exception on MJIT for now
...
somehow the test fails only on Wercker in CIs triggered by GitHub.
Actually rubyci and ci.rvm.jp also have issues too, though.
2019-08-04 10:49:04 +09:00
Takashi Kokubun
a3188f43a8
Revert "Revert "Fix dangling path name from fstring""
...
This reverts commit 326c00b6f8
.
We also confirmed that test_gced_eval_location fails without the changes:
https://travis-ci.org/ruby/ruby/builds/567417818
https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-master/log/20190804T000003Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu1604/ruby-master/log/20190804T003005Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-master/log/20190804T000007Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-master/log/20190804T001806Z.fail.html.gz
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian9/ruby-master/log/20190804T003005Z.fail.html.gz
2019-08-04 10:08:17 +09:00
David Carlier
2d189a6721
yaml few build warning fixes
...
Closes: https://github.com/ruby/ruby/pull/2283
2019-08-04 09:46:46 +09:00
Dmitry Petrashko
b6cfacc85d
Remove dependency on `openssl/conf_api.h`
...
None of the functions defined in this header are actually used in Ruby.
Fixes build against boringssl that does not have this file.
Closes: https://github.com/ruby/ruby/pull/2210
2019-08-04 09:25:32 +09:00
Kenichi Kamiya
0f601df22c
[Doc] Fix Array#to_h call-seq
...
Closes: https://github.com/ruby/ruby/pull/2254
2019-08-04 09:20:56 +09:00
Kenichi Kamiya
84829392f5
[Doc] Fix Array#difference call-seq
...
Closes: https://github.com/ruby/ruby/pull/2255
2019-08-04 09:20:29 +09:00
Semyon Pupkov
4173258fd0
change call CGI methods from :: to .
...
Closes: https://github.com/ruby/ruby/pull/1749
2019-08-04 09:19:30 +09:00
Olivier Lacan
8e7df4bbf9
Use the word heredocs in Here Documents docs
...
Two advantages:
- higher relevance of the extremely common word "heredocs" which may
help people find this page when searching for "ruby heredocs"
- the anchor link becomes `#label-Here+Documents+-28heredocs-29`, which is
ugly due to the parentheses but includes the word "heredocs" in the URL to
this section
If anyone knows a way to prevent RDoc from turning invalid characters into
ugly and meaningless ASCII codes, I'm listening. I don't want to break existing
anchor links but RDoc should really ignore these characters or turn them into
dashes.
Closes: https://github.com/ruby/ruby/pull/2103
2019-08-04 09:18:48 +09:00
Lars Kanis
9311656914
Better wording for __ENCODING__
...
"locale encoding" is misleading since it doesn't mean Encoding.find("locale")
but the encoding used to interpret the script file. It's therefore better to
call it "script encoding" as in the paragraphs above.
Closes: https://github.com/ruby/ruby/pull/1611
2019-08-04 09:03:46 +09:00
Will Binns
636a4fad16
README: Add smart URL for joining mailing list
...
This adds a couple of parameters to the mailing list link in the README
so that the subject line and body are automatically populated. The body
is populated with the `subscribe` string so that all an individual has
to do is perform the send action in their mail client.
Closes: https://github.com/ruby/ruby/pull/2236
2019-08-04 09:03:05 +09:00
Marcus Stollsteimer
7614cc5b24
Fix release post output for tool/format-release
...
Different entries should be separated by an empty line.
Closes: https://github.com/ruby/ruby/pull/2137
2019-08-04 08:58:20 +09:00
Takashi Kokubun
326c00b6f8
Revert "Fix dangling path name from fstring"
...
This reverts commit 5931857281
temporarily,
leaving `TestEval#test_gced_eval_location` to see the impact for missing
the changes.
That's because too many CIs are failing for `require` behaviors:
http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-master/log/20190803T063004Z.fail.html.gz
http://rubyci.s3.amazonaws.com/unstable10x/ruby-master/log/20190803T051806Z.fail.html.gz
http://rubyci.s3.amazonaws.com/unstable11x/ruby-master/log/20190803T052406Z.fail.html.gz
http://rubyci.s3.amazonaws.com/unstable10s/ruby-master/log/20190803T111909Z.fail.html.gz
http://rubyci.s3.amazonaws.com/unstable11s/ruby-master/log/20190803T062506Z.fail.html.gz
http://rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190803T052505Z.fail.html.gz
https://app.wercker.com/ruby/ruby/runs/mjit-test1/5d4512c921ca08000857936a?step=5d451305c2809c0008a3da76
https://app.wercker.com/ruby/ruby/runs/mjit-test2/5d4512c921ca080008579371?step=5d4513000421020007ca122d
http://ci.rvm.jp/results/trunk_gcc4@silicon-docker/2177591
http://ci.rvm.jp/results/trunk_gcc6@silicon-docker/2177596
http://ci.rvm.jp/results/trunk_clang_60@silicon-docker/2178802
http://ci.rvm.jp/results/trunk-theap-asserts@silicon-docker/2177555
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2178747
Mostly `TestRequire#test_race_exception` failures, but in ci.rvm.jp
`require` inside rubyspec hangs very often.
2019-08-04 08:52:41 +09:00
Nobuyoshi Nakada
7adc8c79ea
[DOC] "nmake check" is preferable to "nmake exam" now [ci skip]
...
[Feature #14187 ]
2019-08-04 08:15:05 +09:00
Nobuyoshi Nakada
9b38c84550
[DOC] updated about icons in win32/README.win32 [ci skip]
...
[Bug #13348 ]
2019-08-04 08:07:06 +09:00
git
586e23c97d
* 2019-08-04
2019-08-04 07:15:25 +09:00
Nobuyoshi Nakada
9733b47eb8
[DOC] "nmake check" is preferable to "nmake exam" now [ci skip]
...
[Feature #14187 ]
2019-08-04 07:14:30 +09:00
Nobuyoshi Nakada
6a1458caf2
[DOC] Mark up path names to show a backslash [ci skip]
2019-08-04 07:14:17 +09:00
Hiroshi SHIBATA
d569d721f9
Move assert_ruby_status and assert_throw to CoreAssertions for default gems.
2019-08-03 22:17:45 +09:00
Nobuyoshi Nakada
954223ebd4
[DOC] mentioned minimum versions of tools [ci skip]
2019-08-03 14:56:41 +09:00
Nobuyoshi Nakada
6623cde731
Added more attributes [ci skip]
2019-08-03 14:56:07 +09:00
Nobuyoshi Nakada
4d75346187
Refine error message
...
Highlight failed command and suggest installing the command.
[Bug #16042 ]
2019-08-03 14:20:36 +09:00
Nobuyoshi Nakada
ec0d742dd7
Suppress warnings against locations in eval
2019-08-03 14:07:10 +09:00
git
cee394eb22
* expand tabs.
2019-08-03 13:51:23 +09:00
Nobuyoshi Nakada
5931857281
Fix dangling path name from fstring
...
* parse.y (yycompile): make sure in advance that the `__FILE__`
object shares a fstring, to get rid of dangling path name.
Fixed up 53e9908d8a
. [Bug #16041 ]
* vm_eval.c (eval_make_iseq): ditto.
2019-08-03 13:48:29 +09:00
Nobuyoshi Nakada
688a59f8ac
Show the location of `eval` which uses `__FILE__`/`__LINE__`
2019-08-03 11:32:37 +09:00
git
fb96bea7ed
* expand tabs.
2019-08-03 10:25:20 +09:00