]> code.delx.au - gnu-emacs/blobdiff - test/indent/ruby.rb
* lisp/progmodes/ruby-mode.el (ruby-align-to-stmt-keywords): New
[gnu-emacs] / test / indent / ruby.rb
index 1993c29efb337f04f24de48d26c5133a5806e167..7a1a225834d0a1c04987624c8ace9ed790ead0d2 100644 (file)
@@ -114,17 +114,17 @@ def test2 (arg)
     puts "there"
   end
 
-  case a
-  when "a"
-    6
-  # Support for this syntax was removed in Ruby 1.9, so we
-  # probably don't need to handle it either.
-  # when "b" :
-  #   7
-  # when "c" : 2
-  when "d"  then 4
-  else 5
-  end
+  b = case a
+      when "a"
+        6
+      # Support for this syntax was removed in Ruby 1.9, so we
+      # probably don't need to handle it either.
+      # when "b" :
+      #   7
+      # when "c" : 2
+      when "d"  then 4
+      else 5
+      end
 end
 
 # Some Cucumber code:
@@ -321,18 +321,13 @@ end
 foo |
   bar
 
-foo ||
-  begin
-    bar
-  end
-
 def qux
   foo ||= begin
-    bar
-    tee
-  rescue
-    oomph
-  end
+            bar
+            tee
+          rescue
+            oomph
+          end
 end
 
 %^abc^