]> code.delx.au - gnu-emacs/blob - test/indent/ruby.rb
* lisp/progmodes/opascal.el: Rename from delphi.el. Use lexical-binding.
[gnu-emacs] / test / indent / ruby.rb
1 # Percent literals.
2 b = %Q{This is a "string"}
3 c = %w!foo
4 bar
5 baz!
6 d = %(hello (nested) world)
7
8 # Don't propertize percent literals inside strings.
9 "(%s, %s)" % [123, 456]
10
11 # Or inside comments.
12 x = # "tot %q/to"; =
13 y = 2 / 3
14
15 # Regexp after whitelisted method.
16 "abc".sub /b/, 'd'
17
18 # Don't mis-match "sub" at the end of words.
19 a = asub / aslb + bsub / bslb;
20
21 # Highlight the regexp after "if".
22 x = toto / foo if /do bar/ =~ "dobar"
23
24 # Some Cucumber code:
25 Given /toto/ do
26 print "hello"
27 end