1 if something_wrong
? # ruby-move-to-block-skips-heredoc
2 ActiveSupport
::Deprecation.warn(<<-eowarn)
10 b
= %Q{This is a "string"}
14 d = %(hello (nested) world)
16 # Don't propertize percent literals inside strings.
17 "(%s, %s)" % [123, 456]
23 # Regexp after whitelisted method.
26 # Don't mis-match "sub" at the end of words.
27 a = asub / aslb + bsub / bslb;
29 # Highlight the regexp after "if".
30 x = toto / foo if /do bar/ =~ "dobar"
32 # Regexp options are highlighted.
34 /foo/xi != %r{bar}mo.tee
36 bar(class: XXX) do # ruby-indent-keyword-label
41 foo = [1, # ruby-deep-indent
44 foo = { # ruby-deep-indent-disabled
85 foo = [ # ruby-deep-indent-disabled
89 foo( # ruby-deep-indent-disabled
124 # Support for this syntax was removed in Ruby 1.9, so we
125 # probably don't need to handle it either.
134 # Some Cucumber code:
143 return false unless method == :+
144 x = y + z # Bug#16609
156 # Example from http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html
157 d = 4 + 5 + # no '\' needed
160 # Example from http://www.ruby-doc.org/docs/ProgrammingRuby/html/language.html
164 foo = obj.bar { |m| tee(m) } +
165 obj.qux { |m| hum(m) }
174 MSG = 'Separate every 3 digits in the integer portion of a number' \
175 'with underscores(_).'
187 while a < b do # "do" is optional
197 # https://github.com/rails/rails/blob/17f5d8e062909f1fcae25351834d8e89967b645e/activesupport/lib/active_support/time_with_zone.rb#L206
215 method arg1, # bug#15594
241 it "is a method call with block" do |asd|
250 and_this_one(has) { |block, parameters|
289 # http://stackoverflow.com/questions/17786563/emacs-ruby-mode-if-expressions-indentation
316 foo = [1, 2, 3].map do |i|
369 a.records().map(&:b).zip(
372 # FIXME: This is not consistent with the example below it, but this
373 # offset only happens if the colon is at eol, which wouldn't be often.
374 # Tokenizing `bar:' as `:bar =>' would be better, but it's hard to
375 # distinguish from a variable reference inside a ternary operator.
390 return render json: {
391 errors: { base: [message] },