summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2016-03-12 00:18:42 +0200
committerDmitry Gutov <dgutov@yandex.ru>2016-03-12 00:18:42 +0200
commit576e09e150bceb371b22c4bb26d12991737f689d (patch)
tree7eaee9394a643c00acb2a509d5c717e6c4a81b65 /test
parentfacb5e20ce186e47506860bde982e35020fedce5 (diff)
downloademacs-576e09e150bceb371b22c4bb26d12991737f689d.tar.gz
Support Ruby 2.3.0's safe navigation operator
* lisp/progmodes/ruby-mode.el (ruby-smie--forward-token) (ruby-smie--backward-token): Tokenize '&.' as '.'. (ruby-smie--implicit-semi-p): Check for possible '&' before '.'. * test/indent/ruby.rb: Add an example using safe navigation operator. Fix a syntax error in existing example.
Diffstat (limited to 'test')
-rw-r--r--test/indent/ruby.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb
index 585263d02a6..51923f79373 100644
--- a/test/indent/ruby.rb
+++ b/test/indent/ruby.rb
@@ -24,8 +24,8 @@ d = %(hello (nested) world)
# Don't propertize percent literals inside strings.
"(%s, %s)" % [123, 456]
-"abc/#{def}ghi"
-"abc\#{def}ghi"
+"abc/#{ddf}ghi"
+"abc\#{ddf}ghi"
# Or inside comments.
x = # "tot %q/to"; =
@@ -303,8 +303,9 @@ foo ^
bar
foo_bar_tee(1, 2, 3)
- .qux.bar
- .tee
+ .qux&.bar
+ .tee.bar
+ &.tee
foo do
bar