1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-18 18:05:07 +00:00
emacs/test/indent/ruby.rb
Stefan Monnier dfbd787fe6 * lisp/progmodes/ruby-mode.el: Simplify last change, and cleanup code.
(ruby-syntax-propertize-regexp): Remove.
(ruby-syntax-propertize-function): Split regexp into chunks.
Match following code directly.
* test/indent/ruby.rb: New file, to test new syntax-propertize code.
2012-04-24 13:06:12 -04:00

20 lines
424 B
Ruby

# Don't mis-match "sub" at the end of words.
a = asub / aslb + bsub / bslb;
b = %Q{This is a "string"}
c = %w(foo
bar
baz)
d = %!hello!
# A "do" after a slash means that slash is not a division, but it doesn't imply
# it's a regexp-ender, since it can be a regexp-starter instead!
x = toto / foo; if /do bar/ then
toto = 1
end
# Some Cucumber code:
Given /toto/ do
print "hello"
end