summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-02-06Revert "[rubygems/rubygems] Fix require issue with file extension priority"Hiroshi SHIBATA
This reverts commit d767da428c28b7b9fec56b383bb32f6f76c6ad26. It fails with spec/ruby/core/kernel/require_spec.rb:5
2020-02-06Revert to remove the query command of rubygems.Hiroshi SHIBATA
The original commit was https://github.com/rubygems/rubygems/pull/3119
2020-02-06[rubygems/rubygems] Fix require issue with file extension priorityDavid Rodríguez
If `require "a"` is run when two folders have been specified in the -I option including a "a.rb" file and a "a.so" file respectively, the ruby spec says that the ".rb" file should always be preferred. However, the logic we added in https://github.com/rubygems/rubygems/commit/6b81076d9 to make the -I option always beat default gems does not respect this spec, creating a difference from the original ruby-core's require. [the ruby spec says]: https://github.com/ruby/spec/blob/d80a6e2b221d4f17a8cadcac75ef950c59cba901/core/kernel/shared/require.rb#L234-L246 https://github.com/rubygems/rubygems/commit/b3944384f4
2020-02-06[rubygems/rubygems] Allow releasing with a rubygems pre versionDavid Rodríguez
This condition is too restrictive in my opinion. If a user has a pre version of rubygems installed, she should be fully responsible for it, and we shouldn't restrict any functionality. Also, why is a new prerelease disallowed but an old prelease allowed, or why is 2.0.0.rc2 explictly whitelisted? I believe this kind of exceptions are one more reason to actually permit this. https://github.com/rubygems/rubygems/commit/7f77a77620
2020-02-03Fix SimpleDelegator respond_to? regressionJean Boussier
In 2.6, SimpleDelegator would always use the target `respond_to?` In 2.7.0 it doesn't if the target does not inherit from Object. This breaks compatibility for delegated objects that inherit from BasicObject and redefine `respond_to?`. Notes: Merged: https://github.com/ruby/ruby/pull/2875
2020-02-02[ruby/reline] Bypass cursor down when a char is rendered at eol on Windowsaycabta
A newline is automatically inserted if a character is rendered at eol on Windows command prompt. https://github.com/ruby/reline/commit/4bfea07e4a
2020-02-02[ruby/reline] Fix Reline::Windows#scroll_downaycabta
I mistook Right and Bottom. https://github.com/ruby/reline/commit/8be401c5f5
2020-02-02[ruby/irb] Exclude useless files from RDocNobuyoshi Nakada
https://github.com/ruby/irb/commit/8f1ab2400c
2020-02-02[ruby/irb] Add a new easter egg: dancing rubyYusuke Endoh
https://github.com/ruby/irb/commit/e37dc7e58e
2020-02-01[ruby/irb] Exclude useless files from RDocNobuyoshi Nakada
2020-02-01Merge the current master branch of rubygems/rubygems.Hiroshi SHIBATA
Just started to develop RubyGems 3.2.0.
2020-01-30delegate.rb: fixed keyword arguments in DelegateClassNobuyoshi Nakada
`Delegator.delegating_block` should delegate keyword arguments separately. [ruby-core:96949] Notes: Merged: https://github.com/ruby/ruby/pull/2852
2020-01-30Unnamed groups are not captured when named groups are usedNobuyoshi Nakada
2020-01-29[ruby/reline] Support GNOME style Home/End key sequences [Bug #16510]aycabta
https://github.com/ruby/reline/commit/788f0df845
2020-01-29Isolate the PRNG for tmpdir/tempfileNobuyoshi Nakada
To get rid of conflicts affected by `srand`.
2020-01-28Stop parsing copyright notices as document [ci skip]Nobuyoshi Nakada
2020-01-28Revert "Added RDoc files to parse [Bug #16596]"Nobuyoshi Nakada
This reverts commit 10842daeb571126a090cb10dedf0cda8c2b7f9a8, because it has no effect and the rdoc file has been installed to lib/racc/rdoc directory.
2020-01-28Added RDoc files to parse [Bug #16596]Nobuyoshi Nakada
2020-01-26Always use UTF-8 for Reline::GeneralIO on Windowsaycabta
2020-01-26Always refer to Reline::IOGate.encodingaycabta
2020-01-24brace the fact that lchmod(2) can EOPNOTSUPP卜部昌平
Musl libc has this function as a tiny wrapper of fchmodat(3posix). On the other hand Linux kernel does not support changing modes of a symlink. The operation always fails with EOPNOTSUPP. This fchmodat behaviour is defined in POSIX. We have to take care of such exceptions.
2020-01-23Add #verify_hostname= and #verify_hostname to skip hostname verification (#2858)Yuta Iwama
According to https://github.com/ruby/openssl/pull/60, > Currently an user who wants to do the hostname verification needs to call SSLSocket#post_connection_check explicitly after the TLS connection is established. if an user who wants to skip the hostname verification, SSLSocket#post_connection_check doesn't need to be called https://bugs.ruby-lang.org/issues/16555
2020-01-22Fix pp when passed a empty ruby2_keywords-flagged hash as array elementJeremy Evans
This causes problems because the hash is passed to a block not accepting keywords. Because the hash is empty and keyword flagged, it is removed before calling the block. This doesn't cause an ArgumentError because it is a block and not a lambda. Just like any other block not passed required arguments, arguments not passed are set to nil. Issues like this are a strong reason not to have ruby2_keywords by default. Fixes [Bug #16519] Notes: Merged: https://github.com/ruby/ruby/pull/2855
2020-01-21Reline: Use a more robust detection of MinTTYLars Kanis
The previous detection per get_screen_size fails when stdout is passed to a pipe. That is the case when running ruby tests in parallel ("-j" switch). In this case Reline believes that it's running on MinTTY and the tests are running with ANSI IOGate instead of the Windows adapter on MINGW. So parallel test results were different to that of a single process. This commit fixes these differencies. The code is taken from git sources and translated to ruby. NtQueryObject() is replaced by GetFileInformationByHandleEx(), because NtQueryObject() is undocumented and is more difficult to use: https://github.com/git-for-windows/git/blob/c5a03b1e29c69f3f06c8fabd92493edb73469176/compat/winansi.c#L558 Notes: Merged: https://github.com/ruby/ruby/pull/2848
2020-01-21DocumentRoot is optionalKazuhiro NISHIYAMA
since 2.3.0 https://github.com/ruby/ruby/commit/0b9d86f29be8e3d4fa0958bf3db41907e21ad1a0
2020-01-21[ruby/reline] Implement vi_change_metaaycabta
https://github.com/ruby/reline/commit/8538e0e10f
2020-01-21[ruby/irb] [ruby/irb] Rewrite an expression to detect multilineKenta Murata
https://github.com/ruby/irb/commit/ed5cf375a6 https://github.com/ruby/irb/commit/5b7bbf9c34
2020-01-21[ruby/irb] Add newline_before_multiline_outputKenta Murata
https://github.com/ruby/irb/commit/9eb1801a66
2020-01-20[ruby/irb] Fix compatibility with rails before 5.2Lars Kanis
Rails before 5.2 added Array#append as an alias to Array#<< , so that it expects only one argument. However ruby-2.5 added Array#append as an alias to Array#push which takes any number of arguments. If irb completion is used in `rails c` (for example "IO.<tab>") it fails with: irb/completion.rb:206:in `<<': wrong number of arguments (given 3, expected 1) (ArgumentError) Using Array#push instead of Array#append fixes compatibility. https://github.com/ruby/irb/commit/5b7bbf9c34
2020-01-20[ruby/reline] Implement vi_prev_char and vi_to_prev_charaycabta
https://github.com/ruby/reline/commit/0ad3ee63fa
2020-01-20[ruby/reline] Implement vi_to_next_charaycabta
https://github.com/ruby/reline/commit/066ecb0a21
2020-01-17Implement vi_insert_at_bol and vi_add_at_eolaycabta
2020-01-14Use Reline.encoding_system_needs if existsaycabta
2020-01-14Remove an unused setting variableaycabta
2020-01-14Introduce an abstracted structure about the encoding of Relineaycabta
The command prompt on Windows always uses Unicode to take input and print output but most Reline implementation depends on Encoding.default_external. This commit introduces an abstracted structure about the encoding of Reline.
2020-01-14[ruby/irb] Fix crashing when multiple open braces per lineBen
https://github.com/ruby/irb/issues/55 If we had put multiple open braces on a line the with no closing brace spaces_of_nest array keeps getting '0' added to it. This means that when we pop off of this array we are saying that we should be in position zero for the next line. This is an issue because we don't always want to be in position 0 after a closing brace. Example: ``` [[[ ] ] ] ``` In the above example the 'spaces_of_nest' array looks like this after the first line is entered: [0,0,0]. We really want to be indented 4 spaces for the 1st closing brace 2 for the 2nd and 0 for the 3rd. i.e. we want it to be: [0,2,4]. We also saw this issue with a heredoc inside of an array. ``` [<<FOO] hello FOO ``` https://github.com/ruby/irb/commit/80c69c8272
2020-01-14[ruby/irb] Fix newline depth with multiple bracesBen
This commit fixes the check_newline_depth_difference method to multiple open braces on one line into account. Before this change we were subtracting from the depth in check_newline_depth_difference on every open brace. This is the right thing to do if the opening and closing brace are on the same line. For example in a method definition we have an opening and closing parentheses we want to add 1 to our depth, and then remove it. ``` def foo() end ``` However this isn't the correct behavior when the brace spans multiple lines. If a brace spans multiple lines we don't want to subtract from check_newline_depth_difference and we want to treat the braces the same way as we do `end` and allow check_corresponding_token_depth to pop the correct depth. Example of bad behavior: ``` def foo() [ ] puts 'bar' end ``` Example of desired behavior: ``` def foo() [ ] puts 'bar' end ``` https://github.com/ruby/irb/commit/7dc8af01e0
2020-01-12Make rss library to the bundle gemsHiroshi SHIBATA
[Feature #16485][ruby-core:96683] Notes: Merged: https://github.com/ruby/ruby/pull/2832
2020-01-12Make rexml library to the bundle gemsHiroshi SHIBATA
[Feature #16485][ruby-core:96683] Notes: Merged: https://github.com/ruby/ruby/pull/2832
2020-01-09Fix warnings for URI.encode and URI.decodeJeremy Evans
Use __callee__ to display the called method. Fixes [Bug #16469]
2020-01-09lib/net/imap.rb: use `&blk` instead of Kernel#proc with no blockYusuke Endoh
[Bug #16488]
2020-01-08Merge bundler-2.1.4Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/2822
2020-01-06Support history-size in .inputrc correctlyaycabta
2020-01-06Complete indented and quoted string correctlyaycabta
def foo ''.upca[TAB] This will be completed to be: def foo ''.upcase The indent was gone. This commit fixes the bug.
2020-01-05Rescue EOFErroraycabta
If C-d is pressed before IRB is ready, IRB crashes because EOFError occurs.
2020-01-05Fix OpenStructDocumentationzverok
In https://github.com/ruby/ruby/commit/9be3295d53b6fd9f8a3ad8157aa0655b1976d8ac, OpenStruct's documentation stopped to be rendered by RDoc (there should be no additional code between documentation comment and documented class). Fixing this. Notes: Merged: https://github.com/ruby/ruby/pull/2810
2020-01-05[ruby/reline] Sort completion listKOBAYASHI Shuji
#### Legacy mode: ```console $ irb --legacy irb(main):001:0> l[TAB][TAB] lambda load local_variables loop ``` #### Before this patch: ```console $ irb irb(main):001:0> l[TAB][TAB] local_variables loop lambda load ``` #### After this patch: ```console $ irb irb(main):001:0> l[TAB][TAB] lambda load local_variables loop ``` https://github.com/ruby/reline/commit/6074069c7d
2020-01-03Call initialize_clone with freeze: false if clone called with freeze: falseJeremy Evans
This makes it possible to initialize_clone to correctly not freeze internal state if the freeze: false keyword is passed to clone. If clone is called with freeze: true or no keyword, do not pass a second argument to initialize_clone to keep backwards compatibility. This makes it so that external libraries that override initialize_clone but do not support the freeze keyword will fail with ArgumentError if passing freeze: false to clone. I think that is better than the current behavior, which succeeds but results in an unfrozen object with frozen internals. Fix related issues in set and delegate in stdlib. Fixes [Bug #14266] Notes: Merged: https://github.com/ruby/ruby/pull/2816
2019-12-31Redmine /projects/ruby-trunk is now redirectedTakashi Kokubun
to /projects/ruby-master
2020-01-01Fixup a6864f6d2f39bcd1ff04516591cc18d4027ab186Hiroshi SHIBATA