[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24181: 25.1.50; ruby mode: wrong auto indent after "?" string litera
bug#24181: 25.1.50; ruby mode: wrong auto indent after "?" string literal
Thu, 11 Aug 2016 06:10:22 +0300
Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Thunderbird/47.0
On 08/08/2016 06:50 AM, Ryo Furue wrote:
1. Open an empty Ruby source code, say "tmp.rb".
2. Type the following:
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:
?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.