summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-24[ruby/webrick] Manually pick commit from upstream repoHiroshi SHIBATA
Fix test when run with US-ASCII encoding https://github.com/ruby/webrick/commit/f402aafb36bbd43be54621405da550643a1a1a4c
2020-09-24[ruby/webrick] Allow shutdown_pipe to be passed in via @configJohn W Higgins
https://github.com/ruby/webrick/commit/30152b4bf9
2020-09-24[ruby/webrick] Only run test_big_bodies test on Ruby 2.5+Jeremy Evans
It was added after Ruby 2.5, and it looks like it never ran correctly on Ruby <2.5. https://github.com/ruby/webrick/commit/65fb03cb6a
2020-09-24[ruby/webrick] Allow empty POST and PUT requests without content lengthJeremy Evans
RFC 7230 section 3.3.3 allows for this. Fixes #30 https://github.com/ruby/webrick/commit/069e9b1908
2020-09-24[ruby/webrick] Allow EPROTOTYPE error when writing junk to a socketJeremy Evans
MacOS seems to raise this error in some cases. https://github.com/ruby/webrick/commit/0f0c9f1e61
2020-09-24[ruby/webrick] Fix shutdown_pipe test issueJohn W Higgins
https://github.com/ruby/webrick/commit/9676704c60
2020-09-24[ruby/webrick] Ensure server port numbers are numeric and ensure they are ↵John W Higgins
stored as integers https://github.com/ruby/webrick/commit/86ed621e11
2020-09-24[ruby/webrick] Add test for shutdown_pipeJohn W Higgins
https://github.com/ruby/webrick/commit/1daacc1849
2020-09-24[ruby/webrick] Do not use ensure in a block without beginJeremy Evans
This syntax is not supported until Ruby 2.5, and Webrick still targets Ruby 2.3+. https://github.com/ruby/webrick/commit/fbe85b885f
2020-09-24[ruby/webrick] Make readpartial limit chunk to appropriate sizeJohn W Higgins
https://github.com/ruby/webrick/commit/e693f501bd
2020-09-24[ruby/webrick] Skip env-locale-sensitive CGI test on the "java" platformCharles Oliver Nutter
JRuby's environment variables are provided by the Java Development Kit's (JDK's) classes, which present them as a map from string to string. In order to do this, those environment variable names and values must be decoded into characters, which breaks any variables that are intended to be "raw" bytes not necessarily decodable with the default system encoding. This issue is detailed in jruby/jruby#6248. The only solution on the JRuby side will be to bypass the JDK environment variable API and go directly to the native getenv/setenv system calls. This is not likely to happen in the near future, due to the complexity of such a change and the rarity of undecodable environment values. The exclude here was added due to the Windows platform also having a similar sensitivity to character encodings when working with environment variables. It seems appropriate to expand this skip to the "java" platform, as the root issue is largely the same. https://github.com/ruby/webrick/commit/dc453e5c3c
2020-09-24test/net/http/test_https.rb: The test logic was buggyYusuke Endoh
The expected certs must be `[CA_CERT, SERVER_CERT]` before 1.1.1g and `[SERVER_CERT]` after 1.1.1h.
2020-09-24test/net/http/test_https.rb: the order of verify_callback seems to varyYusuke Endoh
... depending upon the environment.
2020-09-24test/ostruct/test_ostruct.rb: Prevent "method redefined; discarding old foo"Yusuke Endoh
2020-09-24test/fiber/scheduler.rb: Prevent "instance variable @urgent not initialized"Yusuke Endoh
2020-09-24test/net/http/test_https.rb: Stop the error due to openssl 1.1.1hYusuke Endoh
On some environments that uses OpenSSL 1.1.1h, the two tests now fail. http://rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200924T062352Z.fail.html.gz https://github.com/ruby/ruby/runs/1159288773?check_suite_focus=true ``` 1) Failure: TestNetHTTPS#test_get [/data/data/com.termux/files/home/cb/tmp/build/20200924T062352Z/ruby/test/net/http/test_https.rb:47]: <"0\x82\x03\xED0\x82\x02\xD5\xA0\x03..."> expected but was <"0\x82\x03\xE30\x82\x02\xCB\xA0\x03...">. ``` Not sure why, but verify_callback now seems to receive only SERVER_CERT but not CA_CERT. It would be good to investigate the issue furthermore, but tentatively, I want to stop the failures.
2020-09-24add GC_GUARDKoichi Sasada
We observed mark miss on this point so we add RB_GC_GUARD() to avoid wrong free.
2020-09-24sync rb_gc_register_mark_object()Koichi Sasada
rb_vm_t::mark_object_ary is global resource so we need to synchronize to access it.
2020-09-24Remove test for putiseq insnMichael Lindley
putiseq was removed from instruction set in 2b5bb8a0 Notes: Merged: https://github.com/ruby/ruby/pull/3491
2020-09-23Document difference between Thread::Backtrace::Location#{,absolute_}pathJeremy Evans
They are usually the same, except for locations in the main script.
2020-09-24* 2020-09-24 [ci skip]git
2020-09-23Improve the performance of supereileencodes
This PR improves the performance of `super` calls. While working on some Rails optimizations jhawthorn discovered that `super` calls were slower than expected. The changes here do the following: 1) Adds a check for whether the call frame is not equal to the method entry iseq. This avoids the `rb_obj_is_kind_of` check on the next line which is quite slow. If the current call frame is equal to the method entry we know we can't have an instance eval, etc. 2) Changes `FL_TEST` to `FL_TEST_RAW`. This is safe because we've already done the check for `T_ICLASS` above. 3) Adds a benchmark for `T_ICLASS` super calls. 4) Note: makes a chage for `method_entry_cref` to use `const`. On master the benchmarks showed that `super` is 1.76x slower. Our changes improved the performance so that it is now only 1.36x slower. Benchmark IPS: ``` Warming up -------------------------------------- super 244.918k i/100ms method call 383.007k i/100ms Calculating ------------------------------------- super 2.280M (± 6.7%) i/s - 11.511M in 5.071758s method call 3.834M (± 4.9%) i/s - 19.150M in 5.008444s Comparison: method call: 3833648.3 i/s super: 2279837.9 i/s - 1.68x (± 0.00) slower ``` With changes: ``` Warming up -------------------------------------- super 308.777k i/100ms method call 375.051k i/100ms Calculating ------------------------------------- super 2.951M (± 5.4%) i/s - 14.821M in 5.039592s method call 3.551M (± 4.9%) i/s - 18.002M in 5.081695s Comparison: method call: 3551372.7 i/s super: 2950557.9 i/s - 1.20x (± 0.00) slower ``` Ruby VM benchmarks also showed an improvement: Existing `vm_super` benchmark`. ``` $ make benchmark ITEM=vm_super | |compare-ruby|built-ruby| |:---------|-----------:|---------:| |vm_super | 21.555M| 37.819M| | | -| 1.75x| ``` New `vm_iclass_super` benchmark: ``` $ make benchmark ITEM=vm_iclass_super | |compare-ruby|built-ruby| |:----------------|-----------:|---------:| |vm_iclass_super | 1.669M| 3.683M| | | -| 2.21x| ``` This is the benchmark script used for the benchmark-ips benchmarks: ```ruby require "benchmark/ips" class Foo def zuper; end def top; end last_method = "top" ("A".."M").each do |module_name| eval <<-EOM module #{module_name} def zuper; super; end def #{module_name.downcase} #{last_method} end end prepend #{module_name} EOM last_method = module_name.downcase end end foo = Foo.new Benchmark.ips do |x| x.report "super" do foo.zuper end x.report "method call" do foo.m end x.compare! end ``` Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> Co-authored-by: John Hawthorn <john@hawthorn.email> Notes: Merged: https://github.com/ruby/ruby/pull/3545
2020-09-23Revert "Manually merged from https://github.com/rubygems/rubygems/pull/2636"Hiroshi SHIBATA
31a6eaabc165d8a222e176f2c809d90622d88ec2 is obsoleted with https://github.com/rubygems/rubygems/pull/3820
2020-09-23bump Bundler's version to 2.2.0.rc.1Hiroshi SHIBATA
2020-09-23Manually merged from https://github.com/rubygems/rubygems/pull/2636Hiroshi SHIBATA
Enable Style/EmptyLinesAroundClassBody rubocop cop.
2020-09-23bundle-package.* was removed at upstream repoHiroshi SHIBATA
2020-09-23strip trailing spaces [ci skip]Nobuyoshi Nakada
2020-09-23Update the version number of rubygems and bundler at NEWS.mdHiroshi SHIBATA
2020-09-23Fix call-seq [ci skip]Kazuhiro NISHIYAMA
`encoding` can be not only an encoding name, but also an Encoding object. ``` s = String.new('foo', encoding: Encoding::US_ASCII) s.encoding # => #<Encoding:US-ASCII> ```
2020-09-23Bundle rbs gem as bundled gems (#3496)Hiroshi SHIBATA
* Added rbs as bundled gems * Added the missing dependencies for rbs gem Notes: Merged-By: soutaro <matsumoto@soutaro.com>
2020-09-23Removed rb_find_file_ext_safe and rb_find_file_safeHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/3537
2020-09-22Update UnixSocket#recv_io tests to handle receiving a UnixSocketJeremy Evans
Receiving UnixSocket works fine if you don't provide a mode, and I think it is reasonable to expect that you should not provide a mode if klass.for_fd would not accept a mode. Fixes [Bug #11778] Notes: Merged: https://github.com/ruby/ruby/pull/3566
2020-09-22Enhanced RDoc for String (#3565)Burdette Lamar
Makes some methods doc compliant with https://github.com/ruby/ruby/blob/master/doc/method_documentation.rdoc. Also, other minor revisions to make more consistent. Methods: try_convert +string -string concat << prepend hash Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2020-09-22Rudimentary support for disassembling rb_iseq_tAaron Patterson
I need to disassemble instruction sequences while debugging, so I wrote this. Usage is like this: ``` (lldb) p iseq (rb_iseq_t *) $147 = 0x0000000101068400 (lldb) rbdisasm iseq 0000 putspecialobject( 3 ) 0002 putnil 0003 defineclass( ID: 0x560b, (rb_iseq_t *)0x1010681d0, 2 ) 0007 pop 0008 putspecialobject( 3 ) 0010 putnil 0011 defineclass( ID: 0x56eb, (rb_iseq_t *)0x101063b58, 2 ) 0015 leave ``` Also thanks a ton to @kivikakk helping me figure out how to navigate LLDB's Python 😆 Notes: Merged: https://github.com/ruby/ruby/pull/3554
2020-09-22Revert "Prevent SystemStackError when calling super in module with activated ↵Jeremy Evans
refinement" This reverts commit eeef16e190cdabc2ba474622720f8e3df7bac43b. This also reverts the spec change. Preventing the SystemStackError would be nice, but there is valid code that the fix breaks, and it is probably more common than cases that cause the SystemStackError. Fixes [Bug #17182] Notes: Merged: https://github.com/ruby/ruby/pull/3564
2020-09-22Add a comment about why we're checking the finalizer tableAaron Patterson
2020-09-23* 2020-09-23 [ci skip]git
2020-09-22Revert "Pin values in the finalizer table"Aaron Patterson
If an object has a finalizer flag set on it, prevent it from moving. This partially reverts commit 1a9dd31910699c7cd69f2a84c94af20eacd5875c.
2020-09-21Make hash returned by Hash#transform_values not have a defaultJeremy Evans
This sets an explicit default of nil. There is probably a better approach of removing the default. Fixes [Bug #17181] Notes: Merged: https://github.com/ruby/ruby/pull/3563
2020-09-22* 2020-09-22 [ci skip]git
2020-09-21Comply with guide for method doc: string.c (#3528)Burdette Lamar
Methods: ::new #length #bytesize #empty? #+ #* #% Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2020-09-21Make Thread#join always convert its argument, as before 70f08f1eedBenoit Daloze
2020-09-21Simplify the implementation of Scheduler#blockBenoit Daloze
* This shows block() with a timeout is similar to #kernel_sleep and also does not need to change `@blocking`.
2020-09-21Make it clear the first field of join_arg is the waiting threadBenoit Daloze
* And not some list of sort.
2020-09-21Fix Thread leak in Thread#join specsBenoit Daloze
2020-09-21Add NEWS about `Fiber#backtrace` and `Fiber#backtrace_locations`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3562
2020-09-21Update NEWS & documentation relating to scheduler.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3561
2020-09-21Make `Thread#join` non-blocking.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3558
2020-09-21* 2020-09-21 [ci skip]git
2020-09-21When setting current thread scheduler to nil, invoke `#close`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3557