ruby-changes:66006
From: Alexander <ko1@a...>
Date: Wed, 28 Apr 2021 11:57:38 +0900 (JST)
Subject: [ruby-changes:66006] 2afbe7113a (master): [ruby/optparse] Add EditorConfig file
https://git.ruby-lang.org/ruby.git/commit/?id=2afbe7113a From 2afbe7113aceb5e3e1c63fe2778c875e975bacf3 Mon Sep 17 00:00:00 2001 From: Alexander Popov <alex.wayfer@g...> Date: Thu, 18 Mar 2021 00:24:10 +0300 Subject: [ruby/optparse] Add EditorConfig file More info here: https://editorconfig.org/ For example, `ruby/ruby` has it: https://github.com/ruby/ruby/blob/05ebaee/.editorconfig Also fix some offenses. https://github.com/ruby/optparse/commit/29402e7e0e --- misc/rb_optparse.bash | 2 +- misc/rb_optparse.zsh | 4 ++-- test/optparse/test_acceptable.rb | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/misc/rb_optparse.bash b/misc/rb_optparse.bash index e2d2fde..f77d937 100644 --- a/misc/rb_optparse.bash +++ b/misc/rb_optparse.bash @@ -17,5 +17,5 @@ _rb_optparse() { https://github.com/ruby/ruby/blob/trunk/misc/rb_optparse.bash#L17 } rb_optparse () { - [ $# = 0 ] || complete -o default -F _rb_optparse "$@" + [ $# = 0 ] || complete -o default -F _rb_optparse "$@" } diff --git a/misc/rb_optparse.zsh b/misc/rb_optparse.zsh index 9e42eff..258d4f8 100644 --- a/misc/rb_optparse.zsh +++ b/misc/rb_optparse.zsh @@ -25,8 +25,8 @@ generate-complete-function/ruby/optparse () https://github.com/ruby/ruby/blob/trunk/misc/rb_optparse.zsh#L25 mkdir -p "${ZSH_COMPLETION_DIR-$HOME/.zsh.d/Completion}" $1 "--*-completion-zsh=${1:t}" >! "${ZSH_COMPLETION_DIR-$HOME/.zsh.d/Completion}/$cmpl" if [[ $(type -w "$cmpl") == "${cmpl}: function" ]]; then - unfunction "$cmpl" - autoload -U "$cmpl" + unfunction "$cmpl" + autoload -U "$cmpl" else compinit "$cmpl" fi diff --git a/test/optparse/test_acceptable.rb b/test/optparse/test_acceptable.rb index 5c3fbdb..12f7886 100644 --- a/test/optparse/test_acceptable.rb +++ b/test/optparse/test_acceptable.rb @@ -196,4 +196,3 @@ class TestOptionParser::Acceptable < TestOptionParser https://github.com/ruby/ruby/blob/trunk/test/optparse/test_acceptable.rb#L196 end end - -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/