aboutsummaryrefslogtreecommitdiffstats
path: root/test/indent/ruby.rb
diff options
context:
space:
mode:
authorDmitry Gutov2016-03-12 00:18:42 +0200
committerDmitry Gutov2016-03-12 00:18:42 +0200
commit576e09e150bceb371b22c4bb26d12991737f689d (patch)
tree7eaee9394a643c00acb2a509d5c717e6c4a81b65 /test/indent/ruby.rb
parentfacb5e20ce186e47506860bde982e35020fedce5 (diff)
downloademacs-576e09e150bceb371b22c4bb26d12991737f689d.tar.gz
emacs-576e09e150bceb371b22c4bb26d12991737f689d.zip
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/indent/ruby.rb')
-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)
24# Don't propertize percent literals inside strings. 24# Don't propertize percent literals inside strings.
25"(%s, %s)" % [123, 456] 25"(%s, %s)" % [123, 456]
26 26
27"abc/#{def}ghi" 27"abc/#{ddf}ghi"
28"abc\#{def}ghi" 28"abc\#{ddf}ghi"
29 29
30# Or inside comments. 30# Or inside comments.
31x = # "tot %q/to"; = 31x = # "tot %q/to"; =
@@ -303,8 +303,9 @@ foo ^
303 bar 303 bar
304 304
305foo_bar_tee(1, 2, 3) 305foo_bar_tee(1, 2, 3)
306 .qux.bar 306 .qux&.bar
307 .tee 307 .tee.bar
308 &.tee
308 309
309foo do 310foo do
310 bar 311 bar