summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-16Use Gem.default_specifications_dirNobuyoshi Nakada
Gem::Specification.default_specifications_dir is deprecated.
2019-08-16Renamed minitest_helper.rb as helper.rbNobuyoshi Nakada
2019-08-16Use locale directory for the testsNobuyoshi Nakada
2019-08-16Use test-unit instead of minitestNobuyoshi Nakada
Minitest 6 will err `assert_equal` with `nil`. https://github.com/seattlerb/minitest/issues/779
2019-08-16Treat linking to Markdown label correctlyaycabta
2019-08-16Separate RDoc::TokenStream#add_tokens and #add_tokenYusuke Endoh
The old version of `add_tokens` accepts an array of tokens, and multiple arguments of tokens by using `Array#flatten`. And `add_token` was an alias to `add_tokens`. I think it is unnecessarily flexible; in fact, all callsites of `add_tokens` (except test) passes only an array of tokens. And the code created a lot of temporal arrays. This change makes `add_tokens` accept only one array of tokens, and does `add_token` accept one token. It is a bit faster (about 1 second in Ruby's `make rdoc`), and it ls also cleaner in my point of view.
2019-08-16Refactor and improve performance of RDoc::Markup::ParserYusuke Endoh
This change introduces a wrapper of StringScanner that is aware of the current position (column and lineno). It has two advantages: faster and more modular. The old code frequently runs `@input.byteslice(0, byte_offset).length` to get the current position, but it was painfully slow. This change keeps track of the position at each scan, which reduces about half of time of "Generating RI format into ..." in Ruby's `make rdoc` (5.5 sec -> 3.0 sec). And the old code used four instance variables (`@input`, `@line`, `@line_pos`, and `@s`) to track the position. This change factors them out into MyStringScanner, so now only one variable (`@s`) is needed.
2019-08-16Don't echo results of assignment expressionsSteven Willis
2019-08-16Add details about parameters to define_method doc (#2165)OKURA Masafumi
When we use `define_method` and `define_singleton_method`, if we supply block parameters to a block then a generated method has corresponding parameters. However, the doc doesn't mention it, so this info has been added.
2019-08-16Also clean up branch for worktreeTakashi Kokubun
2019-08-16Clean up temporary git resourcesTakashi Kokubun
after `make update-github`
2019-08-16Adding missing test for Net::HTTPGenericRequest initializer (#1835)Espartaco Palma
A new exception is raised if an URI::HTTP is received and that object doesn't have a hostname property. Complementary to #1278
2019-08-16Improve `make update-github` to avoid configureTakashi Kokubun
after doing it once.
2019-08-16Make `make update-github` idempotentTakashi Kokubun
2019-08-16Fix crash on $(PULL_REQUEST) expansionTakashi Kokubun
by directly passing it to Ruby without passing a shell. Formerly it was broken when $(PULL_REQUEST) included quotes.
2019-08-16Avoid confusion in Array#- and Array#difference docs (#2070)Olivier Lacan
My previous attempt to correct #2068 apparently failed and the confusing wording ("instances") was merged into trunk instead. This should address any potential confusion.
2019-08-16Marked up command line options [ci skip]Nobuyoshi Nakada
2019-08-16Fix doc in Object#respond_to_missing? (#2239)songhuangcn
2019-08-16* 2019-08-16 [ci skip]git
2019-08-16Fixed class, module and method references [ci skip]Nobuyoshi Nakada
2019-08-15Fixed a markup in different format [ci skip]Nobuyoshi Nakada
2019-08-15Fixed heap-use-after-freeNobuyoshi Nakada
* string.c (rb_str_sub_bang): retrieves a pointer to the replacement string buffer just before using it, for the case of replacement with the receiver string itself. [Bug #16105]
2019-08-15Prepare to pull commits notes [ci skip]Nobuyoshi Nakada
2019-08-15Simplified GITHUB_TOKEN argument [ci skip]Nobuyoshi Nakada
2019-08-15introduce RUBY_ON_BUG envval. (#2331)Koichi Sasada
`rb_bug()` is called at critical bug, MRI can't run anymore. To make debug easy, this patch introduces RUBY_ON_BUG environment variable to specify the process which is called with pid. [Feature #16090] [GH #2331] RUBY_ON_BUG='gdb -p' ruby xxx.rb In this case, if ruby interpreter causes critical bug, and call rb_bug(), then "gdb -p [PID]' is called by system(3). You can debug on invoked gdb. This feature is limited on RUBY_DEVEL build. Notes: Merged-By: ko1
2019-08-15* expand tabs. [ci skip]git
2019-08-14Make Range#=== operate like cover? instead of include? for string rangesJeremy Evans
Previously, Range#=== treated string ranges that were not endless or beginless the same as include?, instead of the same as cover?. I think this was an oversight in 989e07c0f2fa664a54e52a475c2fcc145f06539d, as the commit message did not indicate this behavior was desired. This also makes some previously dead code no longer dead. Previously, the conditionals were doing this: if (RB_TYPE_P(beg, T_STRING) if (NIL_P(beg)) # can never be true This restructures it so at the NIL_P(beg) check, beg could possibly be nil (beginless ranges). Fixes [Bug #15449]
2019-08-14Fold to lowercase intead of uppercase for String#casecmpJeremy Evans
strcasecmp(3) and String#casecmp? both fold to lowercase.
2019-08-14Implement Range#minmaxJeremy Evans
Range#minmax was previous not implemented, so calling #minmax on range was actually calling Enumerable#minmax. This is a simple implementation of #minmax by just calling range_min and range_max. Fixes [Bug #15867] Fixes [Bug #15807]
2019-08-14Switch to using a VM stack argument instead of 2nd operand for getconstantJeremy Evans
Some tooling depends on the current bytecode, and adding an operand changes the bytecode. While tooling can be updated for new bytecode, this support doesn't warrant such a change.
2019-08-14Use Qtrue/Qfalse instead of 1/0 for 2nd operand to getconstantJeremy Evans
Fixes error when using -Werror,-Wshorten-64-to-32.
2019-08-15* expand tabs. [ci skip]git
2019-08-14Remove support for nil::ConstantJeremy Evans
This was an intentional bug added in 1.9. The approach taken here is to add a second operand to the getconstant instruction for whether nil should be allowed and treated as current scope. Fixes [Bug #11718]
2019-08-15* 2019-08-15 [ci skip]git
2019-08-15Add `make update-github PR=1234` to refresh PR (#2368)Takashi Kokubun
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2019-08-14Drop obsoleted `make merge-github` taskTakashi Kokubun
2019-08-14backtrace and backtrace_locations can be nil (#2358)Steven Harman
Exception#backtrace and Exception#backtrace_locations can both be nil if not set. The former can be set via `Exception#set_backtrace`, but the later is only ever set at runtime via `setup_backtrace`.
2019-08-14Remove strange formatting from English [ci skip]Nikolai B
\vref is not valid doc syntax Notes: Merged: https://github.com/ruby/ruby/pull/2364
2019-08-14Mark bundler / bundled-gems as continue-on-failureTakashi Kokubun
because these tests have failed too often and it's false-positive for checking healthiness of the master branch. Notes: Merged: https://github.com/ruby/ruby/pull/2367
2019-08-14Update the description of check_branchTakashi Kokubun
2019-08-14Rename check_branch.master to pull_request.check_branchTakashi Kokubun
because it's shown as just "master" on a pull request which does not have the check_branch.master job yet. "check_branch" would be easier to understand and now we can grep it from master branch.
2019-08-14Don't accidentally name anonymous module/classAlan Wu
b00f280d4b9569e7153365d7e1c522b3d6b3c6cf introduced an accidental behavior change in that defining a module/class under `m` gives `m` a name when `m` is anonymous. `ruby -ve 'Module.new { class self::A; end; p name }'` outputs a name similar to `Module#inspect` when it should output `nil` like in Ruby 2.6.x. * variable.c: Use `make_temporary_path` instead of `save_temporary_path` when getting the name of the parent module. * variable.c (rb_set_class_path): Delegate to `rb_set_class_path_string` instead of duplicating the logic. [Bug #16097] Notes: Merged: https://github.com/ruby/ruby/pull/2337
2019-08-14fix last commit.Koichi Sasada
2019-08-14* expand tabs.git
2019-08-14change Proc#to_s format ('@...' -> ' ...') (#2362)Koichi Sasada
Now Proc#to_s returns "#<Proc:0x00000237a0f5f170@t.rb:1>". However, it is convenient to select a file name by (double-)clicking on some terminals by separating ' ' instead of '@' like "#<Proc:0x00000237a0f5f170 t.rb:1>" [Feature #16101]
2019-08-14Suppress Uninitialized variables by Coverity ScanKazuhiro NISHIYAMA
Coverity Scan says: ``` ** CID 1452284: Uninitialized variables (UNINIT) /eval.c: 223 in rb_ec_cleanup() ``` ``` >>> CID 1452284: Uninitialized variables (UNINIT) >>> Using uninitialized value "errs[1]". ```
2019-08-14io.c: export rb_io_extract_modeencNobuyoshi Nakada
* include/ruby/io.h (rb_io_enc_t): add typedef. * io.c (rb_io_extract_modeenc): export.
2019-08-14[ruby/stringio] Supported BOMNobuyoshi Nakada
https://github.com/ruby/stringio/commit/b249631c43
2019-08-14[ruby/stringio] Supported `mode:` optionNobuyoshi Nakada
https://github.com/ruby/stringio/commit/53def32ba0
2019-08-14[ruby/stringio] Allow bignum modeNobuyoshi Nakada
https://github.com/ruby/stringio/commit/d28927b561