Re: Beginner question on classes on different files
- From: Eero Saynatkari <ruby-forum-reg@xxxxxxxxxxxxxx>
- Date: Wed, 1 Feb 2006 05:04:28 +0900
Edgard Riba wrote:
> Hi Stefan,
>
> I'm using FreeRuby, and I'm getting intermitent errors.
>
> This is the error I get
>>ruby c:/ruby/samples/hello.rb
> c:/ruby/samples/hello.rb:11: parse error, unexpected tIDENTIFIER,
> expecting $
> h2 = Hello2.new()^Mputs h2.msg^M
> ^
This looks like UNIX-style linebreaks (\n)
that Windows does not interpret correctly.
> However, I placed semi-colons (';') after each line and everything
> compiled fine and ran with expected results:
>
> h = Hello.new();
> h2 = Hello2.new();
>
> puts h2.msg;
> puts h.msg;
> print "Press RETURN";
> $stdin.gets;
>
>
> Seems like some kind of problem with the parser. Maybe I have
> something setup wrong with respect to the end of line character or
> something like that...
There may be a setting in your editor that toggles
the linebreak mode. I actually do not recall this
having been a problem but it has been a while since
I did any ruby development on Windows.
> Thanks,
> Edgard
E
--
Posted via http://www.ruby-forum.com/.
.
- Follow-Ups:
- Re: Beginner question on classes on different files
- From: Edgard Riba
- Re: Beginner question on classes on different files
- References:
- Beginner question on classes on different files
- From: Edgard Riba
- Re: Beginner question on classes on different files
- From: Stefan Mahlitz
- Re: Beginner question on classes on different files
- From: Edgard Riba
- Beginner question on classes on different files
- Prev by Date: Re: ri bug?
- Next by Date: Re: question about class variables and instance variables
- Previous by thread: Re: Beginner question on classes on different files
- Next by thread: Re: Beginner question on classes on different files
- Index(es):