From dfbd787fe6a5684d699926d698aaf9166812a81b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 24 Apr 2012 13:06:12 -0400 Subject: * 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. --- test/indent/ruby.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/indent/ruby.rb (limited to 'test/indent/ruby.rb') diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb new file mode 100644 index 00000000000..c4a747a1c78 --- /dev/null +++ b/test/indent/ruby.rb @@ -0,0 +1,19 @@ +# 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 -- cgit v1.2.1