Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between kEND and $end?

I got this error:

syntax error, unexpected kEND, expecting $end

What's the difference between kEND and $end ?

like image 629
Oded Harth Avatar asked Mar 27 '11 20:03

Oded Harth


People also ask

What is the meaning of end up?

Definition of end up : to reach or come to a place, condition, or situation that was not planned or expected The book ended up in the trash. He didn't want to end up like his father. She ended up a rich woman. He ended up (living) in a nursing home.

What is the difference between end and over?

Normally “end” is a noun and “over” is an adjective. Thus you would say “my job has come to an end” or “my job is over”.


2 Answers

In english this is stating:

syntax error, unexpected end of file, expecting an end keyword

I agree it's a fairly non-intuitive message.

So the difference is:

kEND = end of file

$end = end keyword

like image 80
Mike Lewis Avatar answered Sep 28 '22 19:09

Mike Lewis


kEND is the end of your file $end is the end tag so, something like

if somethingIsTrue
    puts "its true!"
end

Usually when this happens, you forgot to close something with an end.

like image 25
Dhaivat Pandya Avatar answered Sep 28 '22 19:09

Dhaivat Pandya