Commit graph

14659 commits

Author SHA1 Message Date
st0012
e53962b9e1 [ruby/irb] Use require_relative to load extensions/commands
d5060f7668
2022-01-17 21:09:36 +09:00
Yusuke Endoh
b4e362d444 lib/drb/drb.rb: Prevent a "warning: assigned but unused variable"
... by replacing the variable with a underscore-prefixed name
2022-01-17 14:56:11 +09:00
st0012
81b604fb00 [ruby/irb] Use require_relative to require lib files
1. `require` can mislead Ruby to load system irb's files and cause
   constant redefined warnings as other code loads the same module/class
   from lib folder.
2. Most files already use `require_relative`.

848d339f2e
2022-01-17 14:23:40 +09:00
Brandon Weaver
ac1bb6b510 [ruby/net-http] Rename D to debug in Net::HTTP
Renames `D` to `debug` in `Net::HTTP` and introduces an alias for
backwards compatibility. This was done for readability reasons, in that
`D` did not clearly reflect what the method was doing and can cause some
confusion.

582d6e87d6
2022-01-17 10:17:23 +09:00
aycabta
f5e3913737 [ruby/reline] Fix incremental search to work correctly even if not last line
21d75f6d4c
2022-01-16 22:09:31 +09:00
aycabta
921ff739df [ruby/reline] Insert newline in the middle of buffer just after dialog
0c76631132
2022-01-16 22:09:31 +09:00
aycabta
2bc6b07a8d [ruby/reline] Combine common logic into one
5db9738f17
2022-01-16 22:09:29 +09:00
aycabta
f94a2adf6a [ruby/reline] Clear dialog when adding new line to end of buffer
7d38454327
2022-01-16 22:09:28 +09:00
Takashi Kokubun
d12a08abb5 [ruby/erb] Remove safe_level and further positional arguments (https://github.com/ruby/erb/pull/7)
[Feature #14256]

5133efa06f
2022-01-16 06:46:47 +09:00
Takashi Kokubun
3cfb6fc479 [ruby/erb] Escape the second *
The original code just seems unintentional

75a0749cb7
2022-01-16 05:26:37 +09:00
ooooooo_q
b2d15dcad6 [ruby/erb] fix regexp (https://github.com/ruby/erb/pull/6)
33100a022f
2022-01-16 05:21:05 +09:00
loadkpi
7c70151aed [rubygems/rubygems] Fix gem update --system for already installed version of rubygems-update
c167d513a7
2022-01-15 14:00:35 +09:00
Masatoshi SEKI
64e19ad7e9 to prevent collection, keep the last result. 2022-01-15 00:58:21 +09:00
David Rodríguez
7d42b442bb [rubygems/rubygems] Support binstubs with --enable-load-relative prolog
32a5e9057a
2022-01-15 00:00:11 +09:00
David Rodríguez
044b0ae8e0 [rubygems/rubygems] Extract a bit of common logic to methods
9a1b891435
2022-01-15 00:00:10 +09:00
David Rodríguez
810516ca31 [rubygems/rubygems] Fix method documentation to be more correct English
bcffd92c48
2022-01-15 00:00:09 +09:00
Koichi Sasada
53a4e10146 clear @result after setup_message
For the remote object `ro`, method chain like `ro.foo.bar` the
result of `ro.foo` is stored in `@result`, but cleared just
before `setup_message` and it seems GCed on specific machine.

```
  1) Error:
DRbTests::TestDRbCore#test_05_eq:
RangeError: "140" is recycled object
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:366:in `_id2ref'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:366:in `to_obj'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1528:in `to_obj'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1847:in `to_obj'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:620:in `recv_request'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:931:in `recv_request'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1656:in `init_with_client'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1668:in `setup_message'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1632:in `perform'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1725:in `block (2 levels) in main_loop'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1721:in `loop'
    (druby://localhost:36141) /tmp/ruby/v3/src/trunk-repeat20-asserts/lib/drb/drb.rb:1721:in `block in main_loop'
    /tmp/ruby/v3/src/trunk-repeat20-asserts/test/drb/drbtest.rb:206:in `test_05_eq'
```

To prevent collecting, clear `@result` just after `setup_message`
and `setup_message` can get the last result object.
2022-01-14 18:33:16 +09:00
Justin Searls
a485152660 [rubygems/rubygems] Lock standard.yml to the required ruby version
1791b5b9e5
2022-01-13 23:59:55 +09:00
Vyacheslav Alexeev
d0a0637948 [rubygems/rubygems] Use Fiddle in bundle doctor to check for dynamic library presence
ecd495ce1b
2022-01-13 18:16:05 +09:00
Akira Matsuda
9828502570 [rubygems/rubygems] Let Version#spaceship accept a String
With this patch, handwriting version comparisons become a little bit easier.

before:
  SomeGem.version <=> Gem::Version.new('1.3')

after:
  SomeGem.version <=> '1.3'

7e0dbb79f2
2022-01-13 18:15:14 +09:00
Nobuyoshi Nakada
92630e2346
[ruby/optparse] Fix links to the page directory files [Bug #18468]
dab72c543d
2022-01-12 21:16:02 +09:00
Nobuyoshi Nakada
7d94df63c4
[ruby/optparse] Add rdoc options
Specify the main page and the page directory.  Also in Rakefile,
extract and use the same options from the gemspec file.

d182cd60b5
2022-01-12 21:16:01 +09:00
Jeremy Evans
d494a16ac5 [ruby/resolv] Support more characters in link local addresses
Implements [Feature #17524]

993a1a374f
2022-01-12 10:49:57 +09:00
Nobuyoshi Nakada
6d3ee418c2 [rubygems/rubygems] Markup code with RDoc notations
c29cd23826
2022-01-11 20:20:51 +09:00
aycabta
9e79ae539b [ruby/reline] Clear dialog when just_move_cursor is called with dialog at last line
05024b968e
2022-01-11 06:10:37 +09:00
Peter Zhu
09cfc653b7 [ruby/reline] Fix reline on Solaris
Solaris requires that the pointer errret_int is alined to an integer,
however, with VWA, strings are no longer aligned to an integer, so use a
Fiddle::Pointer with a malloc'd region instead.

5fcd89ab0c
2022-01-08 20:32:06 +09:00
ximenasandoval
73be7a85cd [rubygems/rubygems] Fix suggestions flag
b55a1393ca
2022-01-06 23:58:39 +09:00
ximenasandoval
cea4a81056 [rubygems/rubygems] Let fetch understand gem:version syntax
Fix version error message

Add tests to fetch error messages

Fix default version since is not necessary

070620ebe4
2022-01-06 23:58:38 +09:00
David Rodríguez
ee5e684bc1 [rubygems/rubygems] Fix gem install <non-existent-gem> --force crash
Before:

```
$ gem install sfdsfdsfsdide --force
ERROR:  While executing gem ... (NoMethodError)
    undefined method `spec' for nil:NilClass

    @always_install << newest.spec
                             ^^^^^
```

After:

```
$ gem install sfdsfdsfsdide --force
ERROR:  Could not find a valid gem 'sfdsfdsfsdide' (>= 0) in any repository
```

4e2bfd1101
2022-01-06 23:52:48 +09:00
Hiroshi SHIBATA
8bba6d3d54 [rubygems/rubygems] Exclude bin directory for newgem template, Because it contains only development script
01017ee8ca
2022-01-05 19:16:53 +09:00
Kazuhiro NISHIYAMA
5757696e07
res.response_body_permitted? is not defined
`response_body_permitted?` is a method of request.
2022-01-05 16:20:11 +09:00
David Rodríguez
d1a91076dc [rubygems/rubygems] Fix race conditon on JRuby
On JRuby, sometimes we get the following error in CI when running a
realworld test that checks that `gem install rails` succeeds:

```
ERROR:  While executing gem ... (NoMethodError)
    undefined method `ignored=' for nil:NilClass
	/home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/stub_specification.rb:193:in `to_spec'
	org/jruby/RubyArray.java:2642:in `map'
	/home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/specification.rb:758:in `_all'
	/home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/specification.rb:956:in `each'
	org/jruby/RubyEnumerable.java:1710:in `any?'
	/home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/resolver/activation_request.rb:111:in `installed?'
	/home/runner/.rubies/jruby-9.3.2.0/lib/ruby/stdlib/rubygems/request_set.rb:173:in `block in install'
```

I'm not sure how this error is happening, but I think there's no need to
copy the `@ignored` instance variable when materializing stub
specifications. This instance variable is used to not print a warning
about missing extensions more than once for each gem upon gem
activation, but as far as I can see, it's only used by methods that work
on specification stubs. Once specifications are materialized, I think
it can be safely ignored.

301cecd5a7
2022-01-05 07:25:45 +09:00
Christian Boos
11b1ebe606 [ruby/error_highlight] Fix the spurious TypeError.
When we have no backtrace locations, we can't have the highlight,
so just return the message.

9f5c639494
2022-01-04 23:09:01 +09:00
David Rodríguez
f0669fb6cb [ruby/optparse] Use require_relative for internal requires (https://github.com/ruby/optparse/pull/28)
e4f2682128
2022-01-04 16:38:17 +09:00
Nobuyoshi Nakada
8f9623741a [rubygems/rubygems] Append a newline to the checksum file
48ea2778e9
2022-01-04 14:59:17 +09:00
Nobuyoshi Nakada
c2e8e1f6a4 [rubygems/rubygems] Fix checksum
Calculate the checksum of the content, not the given pathname at
the build time itself.

b60ee97ee9
2022-01-04 14:59:16 +09:00
卜部昌平
980bf94f02
Kernel#=~: delete
Has been deprecated since ebff9dc10e.
2022-01-03 22:33:38 +09:00
aycabta
76181ae940 [ruby/reline] Check capname of tigetstr/tigetflag/tigetnum
Incorrect arguments can cause SEGV.

a58748bcf9
2022-01-02 11:44:07 +09:00
aycabta
6d1b406dc8 [ruby/reline] Version 0.3.1
9ab5850444
2022-01-02 11:24:14 +09:00
aycabta
85f304b931 [ruby/reline] Implement Reline::Terminfo.tigetnum
695212d5d2
2022-01-02 10:27:09 +09:00
aycabta
530586fafc [ruby/reline] Fix the difinition of tigetflag() in comment...
af4d77ba09
2022-01-02 00:39:45 +09:00
aycabta
7deee741ab [ruby/reline] Remove unnecessary qualifiers on definition of comments
abc1e4ee88
2022-01-01 23:12:07 +09:00
aycabta
6300c4dcc3 [ruby/reline] Implement Reline::Terminfo.tigetflag
0451ed7a28
2022-01-01 23:06:53 +09:00
YO4
31c69d66d2 [ruby/reline] windows fix scroll
c559d0f7a9
2021-12-30 20:53:21 +09:00
ima1zumi
f589242e75 [ruby/reline] Use unix_line_discard when Ctrl-u is entered
The kill-line was called when C-u was entered, so it is now called unix-line-discard.

In readline(3):

> unix-line-discard (C-u)
>               Kill backward from point to the beginning of the line.
>               The killed text is saved on the kill-ring.

27570d195e
2021-12-30 20:23:58 +09:00
Samuel Williams
e4cd319f3d [ruby/irb] Prefer IO#wait_readable over IO#select. (https://github.com/ruby/irb/pull/323)
1c03bd3373
2021-12-29 09:37:05 +09:00
David Rodríguez
95d2e06c2b [rubygems/rubygems] Fix bundle update --bundler no longer updating lockfile
a053b7e4d4
2021-12-28 04:38:31 +09:00
David Rodríguez
be476f38f9 [rubygems/rubygems] Don't crash when updating to an unsupported rubygems-update version
b0badcd00a
2021-12-27 22:57:46 +09:00
David Rodríguez
dd022c1f76 [rubygems/rubygems] Don't redownload rubygems-update package if already there
This makes it easier to test the upgrade process locally and should be
more efficient in certain cases where the user has already upgraded in
the past.

ed6cc88494
2021-12-27 21:32:32 +09:00
Nobuyoshi Nakada
56a0f34d31 [ruby/drb] Fix method names "regist" as "register"
9a1ff286bc
2021-12-27 18:11:48 +09:00