summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-02Use RB_INTEGER_TYPE_PNobuyoshi Nakada
2019-08-02Expanded f_modNobuyoshi Nakada
2019-08-02* 2019-08-02git
2019-08-01Make attr* methods define public methods if self in caller is not same as ↵Jeremy Evans
receiver Previously, attr* methods could be private even if not in the private section of a class/module block. This uses the same approach that ruby started using for define_method in 1fc33199736f316dd71d0c551edbf514528ddde6. Fixes [Bug #4537]
2019-08-01ext/-test-/bug-14834/bug-14384.c: fallback for MAYBE_UNUSEDYusuke Endoh
__unused__ is unavailable on Sun C. https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris11s-sunc/ruby-master/log/20190801T112505Z.fail.html.gz
2019-08-01Fix assertion failure when VM_CHECK_MODENobuyoshi Nakada
Some VM frames (dummy and top pushed by `rb_vm_call_cfunc`) has iseq but has no pc.
2019-08-01bootstraptest/test_insns.rb: test opt_nil_pKazuhiro NISHIYAMA
2019-08-01Extend sleep before sending USR1 in TestProcessTakashi Kokubun
because the test seems to hang there forever: https://travis-ci.org/ruby/ruby/jobs/566409880
2019-08-01Add a test for opt_nil_pTakashi Kokubun
2019-08-01Use predefined idTo_procNobuyoshi Nakada
2019-08-01Use predefined idOrNobuyoshi Nakada
2019-08-01fix VC 2013 compile error卜部昌平
It seems the compiler does not support VLAs. See also: https://ci.appveyor.com/project/ruby/ruby/builds/26392589/job/px6nuiuw4e78weg1
2019-08-01introduce ar_hint_t.Koichi Sasada
Hash hint for ar_array is 1 byte (unsigned char). This patch introduce ar_hint_t which represents hint type.
2019-08-01* expand tabs.git
2019-08-01calc_lineno(): add assertions卜部昌平
This function has a lot of assumptions. Should make them sure.
2019-08-01fix tracepoint + backtrace SEGV卜部昌平
PC modification in gc_event_hook_body was careless. There are (so to say) abnormal iseqs stored in the cfp. We have to check sanity before we touch the PC. This has not been fixed because there was no way to (ab)use the setup from pure-Ruby. However by using our official C APIs it is possible to touch such frame(s), resulting in SEGV. Fixes [Bug #14834].
2019-08-01* expand tabs.git
2019-08-01signal.c: make signame_prefix a nul-terminated stringYusuke Endoh
gcc 9.1.0 warns this. ``` signal.c:258:46: warning: '%.*s' directive argument is not a nul-terminated string [-Wformat-overflow=] 258 | rb_raise(rb_eArgError, "unsupported signal `%.*s%"PRIsVALUE"'", | ^~~~ 259 | prefix, signame_prefix, vsig); | ~~~~~~~~~~~~~~ signal.c:200:19: note: referenced argument declared here 200 | static const char signame_prefix[3] = "SIG"; | ^~~~~~~~~~~~~~ ``` https://rubyci.org/logs/rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20190801T033009Z.log.html.gz
2019-08-01use internal_id.Koichi Sasada
"hash_iter_lev" can be exported by Marshal.dump and it will introduce inconsistency. To avoid this issue, use internal_id instead of normal ID. This issue is pointed out by Chikanaga-san.
2019-08-01Compact ensure clause and rename variables to fix alignmentKazuhiro NISHIYAMA
2019-07-31Update object.cAaron Patterson
Co-Authored-By: Takashi Kokubun <takashikkbn@gmail.com>
2019-08-01* expand tabs.git
2019-07-31Add a specialized instruction for `.nil?` callsAaron Patterson
This commit adds a specialized instruction for called to `.nil?`. It is about 27% faster than master in the case where the object is nil or not nil. In the case where an object implements `nil?`, I think it may be slightly slower. Here is a benchmark: ```ruby require "benchmark/ips" class Niller def nil?; true; end end not_nil = Object.new xnil = nil niller = Niller.new Benchmark.ips do |x| x.report("nil?") { xnil.nil? } x.report("not nil") { not_nil.nil? } x.report("niller") { niller.nil? } end ``` On Ruby master: ``` [aaron@TC ~/g/ruby (master)]$ ./ruby compil.rb Warming up -------------------------------------- nil? 429.195k i/100ms not nil 437.889k i/100ms niller 437.935k i/100ms Calculating ------------------------------------- nil? 20.166M (± 8.1%) i/s - 100.002M in 5.002794s not nil 20.046M (± 7.6%) i/s - 99.839M in 5.020086s niller 22.467M (± 6.1%) i/s - 112.111M in 5.013817s [aaron@TC ~/g/ruby (master)]$ ./ruby compil.rb Warming up -------------------------------------- nil? 449.660k i/100ms not nil 433.836k i/100ms niller 443.073k i/100ms Calculating ------------------------------------- nil? 19.997M (± 8.8%) i/s - 99.375M in 5.020458s not nil 20.529M (± 7.0%) i/s - 102.385M in 5.020689s niller 21.796M (± 8.0%) i/s - 108.110M in 5.002300s [aaron@TC ~/g/ruby (master)]$ ./ruby compil.rb Warming up -------------------------------------- nil? 402.119k i/100ms not nil 438.968k i/100ms niller 398.226k i/100ms Calculating ------------------------------------- nil? 20.050M (±12.2%) i/s - 98.519M in 5.008817s not nil 20.614M (± 8.0%) i/s - 102.280M in 5.004531s niller 22.223M (± 8.8%) i/s - 110.309M in 5.013106s ``` On this branch: ``` [aaron@TC ~/g/ruby (specialized-nilp)]$ ./ruby compil.rb Warming up -------------------------------------- nil? 468.371k i/100ms not nil 456.517k i/100ms niller 454.981k i/100ms Calculating ------------------------------------- nil? 27.849M (± 7.8%) i/s - 138.169M in 5.001730s not nil 26.417M (± 8.7%) i/s - 131.020M in 5.011674s niller 21.561M (± 7.5%) i/s - 107.376M in 5.018113s [aaron@TC ~/g/ruby (specialized-nilp)]$ ./ruby compil.rb Warming up -------------------------------------- nil? 477.259k i/100ms not nil 428.712k i/100ms niller 446.109k i/100ms Calculating ------------------------------------- nil? 28.071M (± 7.3%) i/s - 139.837M in 5.016590s not nil 25.789M (±12.9%) i/s - 126.470M in 5.011144s niller 20.002M (±12.2%) i/s - 98.144M in 5.001737s [aaron@TC ~/g/ruby (specialized-nilp)]$ ./ruby compil.rb Warming up -------------------------------------- nil? 467.676k i/100ms not nil 445.791k i/100ms niller 415.024k i/100ms Calculating ------------------------------------- nil? 26.907M (± 8.0%) i/s - 133.755M in 5.013915s not nil 25.319M (± 7.9%) i/s - 125.713M in 5.007758s niller 19.569M (±11.8%) i/s - 96.286M in 5.008533s ``` Co-Authored-By: Ashe Connor <kivikakk@github.com>
2019-08-01make inline functions from macros.Koichi Sasada
2019-07-31use hash_ar_table_set() directlyKoichi Sasada
2019-07-31HASH_ASSERT() respects HASH_DEBUGKoichi Sasada
2019-08-01check hash_hint is different.Koichi Sasada
2019-07-31File.realpath can raise ENOTDIRKoichi Sasada
2019-07-31Revert "Let prev EP move"Aaron Patterson
This reverts commit e352445863588b90f7af6cdf6c1b6dc432ee33ab. This is breaking CI and I'm not sure why yet, so I'll revert for now.
2019-08-01* 2019-08-01git
2019-07-31Let prev EP moveAaron Patterson
This commit allows the previos EP pointer to move, then updates its location
2019-07-31run single spec [ci skip]Nobuyoshi Nakada
2019-07-31test/ruby/test_hash.rb: remove a unused vribleYusuke Endoh
to suppress a warning
2019-07-31lib/bundler/shared_helpers.rb: remove require "rubygems"Yusuke Endoh
Because it causes circular require.
2019-07-31Split in two spec examplesBenoit Daloze
2019-07-31Attempt to fix Hash#rehash specBenoit Daloze
2019-07-31Fix `Leaked thread`Kazuhiro NISHIYAMA
Sometimes `Leaked thread: Rinda::TestRingServer#test_ring_server_ipv6_multicast` happens because `Rinda::TupleSpace#start_keeper` runs after stopping `@keeper`.
2019-07-31delete a check on bad assumption.Koichi Sasada
If object was modified, but there is a case that hash values (#hash) are same between before modified and after modified objects.
2019-07-31check SystemStackErrorKoichi Sasada
This recursive iteration test can cause SystemStackError so check it correctly.
2019-07-31backtrace can be nil.Koichi Sasada
Surprisingly, on SystemStackError#backtrace can return nil.
2019-07-31Revert "add debug code"Koichi Sasada
This reverts commit e83ec207cd5fda973c41d6629d8504b515522b12.
2019-07-31test/ruby/test_float.rb: suppress an overflow warningYusuke Endoh
``` warning: Float 0xf.fp10000000000000... out of range ```
2019-07-31add debug codeKoichi Sasada
2019-07-31test/ruby/test_io.rb (test_binmode_pipe): close all pipes explicitlyYusuke Endoh
to suppress the leak checker.
2019-07-31test/rdoc/test_rdoc_rubygems_hook.rb: suppress deprecation warningYusuke Endoh
2019-07-31test/ruby/test_file_exhaustive.rb: suppress method-redefined warningYusuke Endoh
2019-07-31move macro to internal.h for documentation.Koichi Sasada
13e84d5c0a changes enum to macro, but the flags usage information are lost in internal.h. It should be same place with other flags information.
2019-07-31test/rubygems/test_gem_remote_fetcher.rb: suppress deprecation warningsYusuke Endoh
2019-07-31Moved RHASH_LEV_MASK and turned into a macroNobuyoshi Nakada
Get rid of "ISO C restricts enumerator values to range of 'int'" error.
2019-07-31* expand tabs.git