aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDmitry Gutov2013-10-22 02:25:59 +0400
committerDmitry Gutov2013-10-22 02:25:59 +0400
commit18cacc392d076dfd78b58e842116c0c578aaf3c7 (patch)
tree49c2ef2ee1f7d002025ecc5ed9364ac1271a0c44 /test
parent1257317a7c3d4052a6c43f2774cd0a6c6057d420 (diff)
downloademacs-18cacc392d076dfd78b58e842116c0c578aaf3c7.tar.gz
emacs-18cacc392d076dfd78b58e842116c0c578aaf3c7.zip
* lisp/progmodes/ruby-mode.el (ruby-smie-grammar): Remove outdated
TODO. Add "." after " @ ". (ruby-smie--at-dot-call): New function. Checks if point at method call with explicit target. (ruby-smie--forward-token, ruby-smie--backward-token): Prepend "." to the method name tokens when it precedes them. (ruby-smie--backward-id, ruby-smie--forward-id): Remove. (ruby-smie-rules): Add rule for indentation before and after "." token.
Diffstat (limited to 'test')
-rw-r--r--test/indent/ruby.rb17
1 files changed, 14 insertions, 3 deletions
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb
index c9ec8bd3723..5c47eea0baf 100644
--- a/test/indent/ruby.rb
+++ b/test/indent/ruby.rb
@@ -189,15 +189,16 @@ end
189foo + 189foo +
190 bar 190 bar
191 191
192foo_bar_tee(1, 2, 3)
193 .qux
194 .bar
195
192# Examples below still fail with `ruby-use-smie' on: 196# Examples below still fail with `ruby-use-smie' on:
193 197
194foo = [1, 2, 3].map do |i| 198foo = [1, 2, 3].map do |i|
195 i + 1 199 i + 1
196end 200end
197 201
198foo_bar_tee(1, 2, 3)
199 .qux
200
201method !arg1, 202method !arg1,
202 arg2 203 arg2
203 204
@@ -209,3 +210,13 @@ method :foo,
209 210
210method (a + b), 211method (a + b),
211 c 212 c
213
214foo do
215 bar
216 .tee
217end
218
219def bar
220 foo
221 .baz
222end