[前][次][番号順一覧][スレッド一覧]

ruby-changes:41678

From: nobu <ko1@a...>
Date: Sat, 6 Feb 2016 20:51:35 +0900 (JST)
Subject: [ruby-changes:41678] nobu:r53752 (trunk): get rid of ruby-mode.el bugs

nobu	2016-02-06 20:51:40 +0900 (Sat, 06 Feb 2016)

  New Revision: 53752

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53752

  Log:
    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

  Modified files:
    trunk/lib/optparse.rb
Index: lib/optparse.rb
===================================================================
--- lib/optparse.rb	(revision 53751)
+++ lib/optparse.rb	(revision 53752)
@@ -577,7 +577,7 @@ class OptionParser https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L577
         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 https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L1903
   #
   # 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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]