aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* brace the fact that lchmod(2) can EOPNOTSUPP卜部昌平2020-01-241-1/+2
| | | | | | | 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.
* Add #verify_hostname= and #verify_hostname to skip hostname verification (#2858)Yuta Iwama2020-01-231-3/+11
| | | | | | | | | | | | 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
* Fix pp when passed a empty ruby2_keywords-flagged hash as array elementJeremy Evans2020-01-221-1/+1
| | | | | | | | | | | | | | 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]
* Reline: Use a more robust detection of MinTTYLars Kanis2020-01-212-2/+30
| | | | | | | | | | | | | | 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
* DocumentRoot is optionalKazuhiro NISHIYAMA2020-01-211-2/+2
| | | | | since 2.3.0 https://github.com/ruby/ruby/commit/0b9d86f29be8e3d4fa0958bf3db41907e21ad1a0
* [ruby/reline] Implement vi_change_metaaycabta2020-01-211-0/+12
| | | | https://github.com/ruby/reline/commit/8538e0e10f
* [ruby/irb] [ruby/irb] Rewrite an expression to detect multilineKenta Murata2020-01-211-1/+1
| | | | | | https://github.com/ruby/irb/commit/ed5cf375a6 https://github.com/ruby/irb/commit/5b7bbf9c34
* [ruby/irb] Add newline_before_multiline_outputKenta Murata2020-01-212-1/+27
| | | | https://github.com/ruby/irb/commit/9eb1801a66
* [ruby/irb] Fix compatibility with rails before 5.2Lars Kanis2020-01-201-1/+1
| | | | | | | | | | | | | | | 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
* [ruby/reline] Implement vi_prev_char and vi_to_prev_charaycabta2020-01-201-0/+48
| | | | https://github.com/ruby/reline/commit/0ad3ee63fa
* [ruby/reline] Implement vi_to_next_charaycabta2020-01-201-2/+12
| | | | https://github.com/ruby/reline/commit/066ecb0a21
* Implement vi_insert_at_bol and vi_add_at_eolaycabta2020-01-171-0/+10
|
* Use Reline.encoding_system_needs if existsaycabta2020-01-144-7/+20
|
* Remove an unused setting variableaycabta2020-01-141-1/+0
|
* Introduce an abstracted structure about the encoding of Relineaycabta2020-01-146-23/+40
| | | | | | 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.
* [ruby/irb] Fix crashing when multiple open braces per lineBen2020-01-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [ruby/irb] Fix newline depth with multiple bracesBen2020-01-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make rss library to the bundle gemsHiroshi SHIBATA2020-01-1244-10082/+0
| | | | [Feature #16485][ruby-core:96683]
* Make rexml library to the bundle gemsHiroshi SHIBATA2020-01-1250-9482/+0
| | | | [Feature #16485][ruby-core:96683]
* Fix warnings for URI.encode and URI.decodeJeremy Evans2020-01-091-2/+2
| | | | | | Use __callee__ to display the called method. Fixes [Bug #16469]
* lib/net/imap.rb: use `&blk` instead of Kernel#proc with no blockYusuke Endoh2020-01-091-4/+5
| | | | [Bug #16488]
* Merge bundler-2.1.4Hiroshi SHIBATA2020-01-085-29/+7
|
* Support history-size in .inputrc correctlyaycabta2020-01-061-3/+5
|
* Complete indented and quoted string correctlyaycabta2020-01-061-2/+6
| | | | | | | | | | | | def foo ''.upca[TAB] This will be completed to be: def foo ''.upcase The indent was gone. This commit fixes the bug.
* Rescue EOFErroraycabta2020-01-051-0/+3
| | | | If C-d is pressed before IRB is ready, IRB crashes because EOFError occurs.
* Fix OpenStructDocumentationzverok2020-01-051-3/+2
| | | | | | | 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.
* [ruby/reline] Sort completion listKOBAYASHI Shuji2020-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #### 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
* Call initialize_clone with freeze: false if clone called with freeze: falseJeremy Evans2020-01-032-4/+4
| | | | | | | | | | | | | | | | | | | 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]
* Redmine /projects/ruby-trunk is now redirectedTakashi Kokubun2019-12-311-1/+1
| | | | to /projects/ruby-master
* Fixup a6864f6d2f39bcd1ff04516591cc18d4027ab186Hiroshi SHIBATA2020-01-011-2/+2
|
* [ruby/reline] Degenerate the terminal size to [$LINES, $COLUMNS] if it is ↵Yusuke Endoh2019-12-311-1/+5
| | | | | | | | unknown This is a workaround for https://github.com/ruby/irb/issues/50 https://github.com/ruby/reline/commit/5725677d1a
* speed up set intersectOleg Zubchenko2019-12-311-1/+9
|
* Drop an invalid char as UTF-8aycabta2019-12-271-0/+10
|
* [ruby/reline] Version 0.1.2aycabta2019-12-251-1/+1
| | | | https://github.com/ruby/reline/commit/b41024e317
* Save last breaking point to completeaycabta2019-12-251-0/+1
|
* [bundler/bundler] Do `require "rubygems"` only when neededYusuke Endoh2019-12-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This require causes circular require. ``` $ touch empty_file $ RUBYGEMS_GEMDEPS=empty_file ./local/bin/ruby -w -e '' /home/mame/work/ruby/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92: warning: /home/mame/work/ruby/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92: warning: loading in progress, circular require considered harmful - /home/mame/work/ruby/local/lib/ruby/2.7.0/rubygems.rb from <internal:gem_prelude>:1:in `<internal:gem_prelude>' from <internal:gem_prelude>:1:in `require' from /home/mame/work/ruby/local/lib/ruby/2.7.0/rubygems.rb:1417:in `<top (required)>' from /home/mame/work/ruby/local/lib/ruby/2.7.0/rubygems.rb:1203:in `use_gemdeps' from /home/mame/work/ruby/local/lib/ruby/2.7.0/rubygems/user_interaction.rb:47:in `use_ui' from /home/mame/work/ruby/local/lib/ruby/2.7.0/rubygems.rb:1204:in `block in use_gemdeps' from /home/mame/work/ruby/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' from /home/mame/work/ruby/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' from /home/mame/work/ruby/local/lib/ruby/2.7.0/bundler.rb:11:in `<top (required)>' from /home/mame/work/ruby/local/lib/ruby/2.7.0/bundler.rb:11:in `require_relative' from /home/mame/work/ruby/local/lib/ruby/2.7.0/bundler/rubygems_integration.rb:3:in `<top (required)>' from /home/mame/work/ruby/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' from /home/mame/work/ruby/local/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require' ``` https://github.com/bundler/bundler/commit/c7c5bcea92
* [ruby/readline] Version 0.0.2aycabta2019-12-251-1/+1
| | | | https://github.com/ruby/readline/commit/42b71f3fc0
* [ruby/readline] Use a box to make easier to see the messageaycabta2019-12-251-7/+9
| | | | https://github.com/ruby/readline/commit/e49e942053
* [ruby/readline] Fix any wrong in messagesaycabta2019-12-251-4/+4
| | | | https://github.com/ruby/readline/commit/a2cf437c8f
* [ruby/readline] Version 0.0.1aycabta2019-12-251-1/+1
| | | | https://github.com/ruby/readline/commit/d2363cad33
* [ruby/readline] Add post_install_messageaycabta2019-12-251-0/+10
| | | | https://github.com/ruby/readline/commit/03126372b5
* [ruby/reline] Version 0.1.1aycabta2019-12-251-1/+1
| | | | https://github.com/ruby/reline/commit/923f97d068
* The behavior of vi_end_of_transmission should be the same of vi_list_or_eofaycabta2019-12-251-12/+0
|
* ^D on non-empty line in vi mode behaves like Enteraycabta2019-12-251-1/+3
|
* Sync did_you_meanYuki Nishijima2019-12-241-1/+1
|
* Merge Bundler 2.1.2 from bundler/bundler.Hiroshi SHIBATA2019-12-252-1/+3
| | | | [Misc #16449][ruby-core:96458]
* [ruby/irb] Fix typoMarcus Stollsteimer2019-12-241-1/+1
| | | | https://github.com/ruby/irb/commit/4bb1340687
* Remove unused variableaycabta2019-12-241-1/+0
|
* The delete-char-or-list shows completed list when called at end of lineaycabta2019-12-242-6/+27
| | | | It doesn't behave the same as the delete-char.
* [ruby/reline] Version 0.1.0aycabta2019-12-241-1/+1
| | | | https://github.com/ruby/reline/commit/55d4dfec1e