1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

8 commits

Author SHA1 Message Date
aycabta
19977cc761 Remove unnecessary variables 2019-06-08 00:14:58 +09:00
Kazuhiro NISHIYAMA
533070bfc6
Use lines instead of split
```
% cat ~/bench-split.yml
prelude: |
  s = "foo\nbar\nbaz\n"
benchmark:
  '/(?<=\n)/': |
    s.split(/(?<=\n)/)
  '/^/': |
    s.split(/^/)
  'lines': |
    s.lines
Warming up --------------------------------------
           /(?<=\n)/   459.123k i/s -    467.844k times in 1.018994s (2.18μs/i)
                 /^/   467.922k i/s -    469.744k times in 1.003894s (2.14μs/i)
               lines     2.343M i/s -      2.424M times in 1.034677s (426.84ns/i)
Calculating -------------------------------------
           /(?<=\n)/   422.347k i/s -      1.377M times in 3.261232s (2.37μs/i)
                 /^/   477.603k i/s -      1.404M times in 2.939186s (2.09μs/i)
               lines     2.485M i/s -      7.028M times in 2.828757s (402.47ns/i)

Comparison:
               lines:   2484631.6 i/s
                 /^/:    477603.3 i/s - 5.20x  slower
           /(?<=\n)/:    422346.5 i/s - 5.88x  slower
```
2019-06-03 10:32:32 +09:00
Nobuyoshi Nakada
f4b060d8d7 Check conditional nestings in INPUTRC
Closes: https://github.com/ruby/ruby/pull/2222
2019-06-02 22:58:05 +09:00
Kazuhiro NISHIYAMA
4fda39fc87
Use simpler regexp 2019-06-02 22:37:42 +09:00
Nobuyoshi Nakada
d04ebc57f2 Add true condition Reline 2019-06-02 20:31:25 +09:00
aycabta
de01c4ec00 Reset Config at Reline::Config::Test#teardown 2019-06-01 16:47:59 +09:00
aycabta
7df65ef676 Use inputrc data for keystroke setting 2019-06-01 09:06:27 +09:00
aycabta
17350c7e55 Add Reline as a fallback library for Readline
* lib/reine.rb, lib/reline/*: Reline is a readline stdlib compatible
  library.
* lib/readline.rb: Readline uses a fallback to Reline when ext/readline
  doesn't exist.
* tool/sync_default_gems.rb: add ruby/reline as a default gem.
* appveyor.yml: add "set RELINE_TEST_ENCODING=Windows-31J" for test suit
  of Reline, and add "--exclude readline" to "nmake test-all" on Visual
  Studio builds because of strange behavior.
* spec/ruby/library/readline/spec_helper.rb: skip Reline as with
  RbReadline.
2019-04-30 11:44:20 +09:00