summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-06 11:51:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-06 11:51:40 +0000
commit6860034546808d4f67ba8f407f3d7aced0c54c5a (patch)
tree155dca65e0292f33c8681f8e26bca3216d519176
parent6354a08dc8c7f1a06bf35b47052a65816dca2e7a (diff)
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
-rw-r--r--lib/optparse.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 280aa4934db..cc0de234064 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -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