Difference in error messages for ruby -c command for ruby and jruby

λ rvm use jruby

info: Using jruby 1.5.1

λ ruby -c status.rb
SyntaxError in status.rb:16: syntax error, unexpected end-of-file

λ rvm use 1.8.7

info: Using ruby 1.8.7 p174

λ ruby -c status.rb
status.rb:15: syntax error, unexpected $end, expecting kEND

This makes a huge difference when you use flymake-ruby.el for Emacs.
flymake-ruby just does not work.

Do anybody have solution to make it work?

Basically need to port following regex
http://github.com/purcell/emacs.d/blob/master/site-lisp/flymake-ruby/flymake-ruby.el

(defvar flymake-ruby-err-line-patterns '((“^\(.\):\([0-9]+\):
\(.
\)$” 1 2 nil 3)))

Anybody using Emacs? I know Ola does. :slight_smile:

Which difference specifically do you have a problem with, the line
number or the fact that we have a nicer error?

2010/6/15 Anil W. [email protected]:

λ rvm use 1.8.7


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Charles, basically flymake-ruby exits saying some error occurred when
there
is wrong syntax. So can’t use flymake-ruby.el with JRuby.

I am sure somebody else might have faced this issue and possibly found a
solution for it.

– Anil

On Wed, Jun 16, 2010 at 1:25 AM, Charles Oliver N.

On the subject of which, is there an easy way to check the syntax of a
file from within JRuby and get a nice report back?

Dan


Daniel L.

twitter.com/danlucraft
danlucraft.com/blog

On 16 Jun 2010, at 07:06, Anil W. wrote:

2010/6/15 Anil W. [email protected]:

λ rvm use 1.8.7


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email