Subject: Re: bug#24181: 25.1.50; ruby mode: wrong auto indent after "?" string literal

From: Dmitry Gutov <[email-masked]>
Date: Thu, 11 Aug 2016 06:10:22 +0300

Hi!

On 08/08/2016 06:50 AM, Ryo Furue wrote:

> 1. Open an empty Ruby source code, say "tmp.rb".
> 2. Type the following:
>
> #!/usr/bin/ruby
> base = ?a.ord - 1
>
> On hitting the return key at the end of the second line, the cursor
> moves below "a", not to the top of the third line. The indentation
> state seems to be confused.  I did this test with "emacs -q" .

Thanks for the report. I'd like to fix it sometime, but it's not a big 
priority, considering this syntax is usually discouraged:

https://github.com/bbatsov/ruby-style-guide#no-character-literals

> ?a is a valid Ruby syntax for string literal.  After writing this, I learned
> that "a".ord is equivalent (I think)

Yes, in Ruby 1.9 and newer, it's a full equivalent.