aboutsummaryrefslogtreecommitdiffstats
path: root/test/indent/ruby.rb
diff options
context:
space:
mode:
authorDmitry Gutov2013-12-14 08:46:13 +0200
committerDmitry Gutov2013-12-14 08:46:13 +0200
commit276bc3337b27bcd76aa2735ed96c160c6a1b573a (patch)
tree998438a0496b773195c79bd11f9372d06497d96f /test/indent/ruby.rb
parentdc7909c40a5524af650a7d4233f393a43bf6706c (diff)
downloademacs-276bc3337b27bcd76aa2735ed96c160c6a1b573a.tar.gz
emacs-276bc3337b27bcd76aa2735ed96c160c6a1b573a.zip
Fix bug#16118
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Return nil before open-paren tokens when preceded by a open-paren, too. (ruby-smie-rules): Handle virtual indentation after open-paren tokens specially. If there is code between it and eol, return the column where is starts. * test/indent/ruby.rb: New examples.
Diffstat (limited to 'test/indent/ruby.rb')
-rw-r--r--test/indent/ruby.rb39
1 files changed, 35 insertions, 4 deletions
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb
index 3c4d68a97bf..7b85899577c 100644
--- a/test/indent/ruby.rb
+++ b/test/indent/ruby.rb
@@ -45,10 +45,41 @@ foo = { a: b,
45 a1: b1 45 a1: b1
46 } 46 }
47 47
48foo({ 48foo({ # bug#16118
49 a: b, 49 a: b,
50 c: d 50 c: d
51 }) 51 }
52 ) # bug#16116
53
54bar = foo(
55 a, [
56 1,
57 ],
58 :qux => [
59 3
60 ]
61 )
62
63foo(
64 [
65 {
66 a: b
67 },
68 ],
69 {
70 c: d
71 }
72)
73
74foo([{
75 a: 2
76 },
77 {
78 b: 3
79 },
80 4
81 ]
82 )
52 83
53foo = [ # ruby-deep-indent-disabled 84foo = [ # ruby-deep-indent-disabled
54 1 85 1