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

get rid of ruby-mode.el bugs

* lib/optparse.rb: get rid of confusing ruby-mode.el of Emacs 24,
  - if-end expression inside an expression
  - a comma just followed by a bar

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-02-06 11:51:40 +00:00
parent 6354a08dc8
commit 6860034546

View file

@ -577,7 +577,7 @@ class OptionParser
l = left[-1].length + s.length
l += arg.length if left.size == 1 && arg
l < max or sopts.empty? or left << ''
left[-1] << if left[-1].empty? then ' ' * 4 else ', ' end << s
left[-1] << (left[-1].empty? ? ' ' * 4 : ', ') << s
end
if arg
@ -1903,7 +1903,7 @@ XXX
#
# List of strings separated by ",".
#
accept(Array) do |s,|
accept(Array) do |s, |
if s
s = s.split(',').collect {|ss| ss unless ss.empty?}
end