ruby-beautify icon indicating copy to clipboard operation
ruby-beautify copied to clipboard

Beautify removed last "end"

Open gneiss01 opened this issue 10 years ago • 5 comments

Hi,

After trying to beautify my codes, it introduced lot of errors and one of these is:

Original: module MyModule::Exceptions class NotFoundError < StandardError end end

After executing "ruby-beautify -c 2 -s --overwrite notfounderror.rb" it became module MyModule::Exceptions class NotFoundError < StandardError end

Am I missing something in the command line options? Thanks,

gneiss01 avatar May 19 '15 02:05 gneiss01

No, it has a few bugs, I'll try to figure out the cause of this one and get it fixed.

One of them appears to be stripping trailing end.

erniebrodeur avatar May 23 '15 20:05 erniebrodeur

IT only strips trailing ends under certain cases, i don't entirely understand. Need to check my crawler to see whats going on in more detail.

erniebrodeur avatar Jun 23 '15 04:06 erniebrodeur

It looks like it might be if there's a \n missing at the end of the file.

opsb avatar Aug 18 '15 09:08 opsb

I've seen it too, I think that's correct, I'll make a scenario for my tests soon and get this patched.

erniebrodeur avatar Aug 18 '15 15:08 erniebrodeur

fixed in #31

hzulla avatar Jan 25 '16 14:01 hzulla