Qu :

Hi
I typed 1 : 3 (typo)
which ended ruby with "expecting end of input"
What does this mean?
Thanks
Berg

If I had to guess of the top of my head it would mean ruby is expecting the
use of an "end" keyword somewhere in relation to some loop or construct
you've created.

···

On Wed, Feb 10, 2016 at 2:36 PM, A Berger <aberger7890@gmail.com> wrote:

Hi
I typed 1 : 3 (typo)
which ended ruby with "expecting end of input"
What does this mean?
Thanks
Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Any experts?
Is : used anywhere?
What does :: do ( in difference to . ) ?
Thx Berg

You should start by providing exact data! The complete message is important:

$ ruby -ce '1 : 3'
-e:1: syntax error, unexpected ':', expecting end-of-input
1 : 3
   ^

So parsing breaks at the colon. There is no sequence beginning with a
colon that is legal in Ruby's syntax. You can find plenty of
information about context free languages and parser creation if you
want to understand more.

robert

···

On Wed, Feb 10, 2016 at 8:36 PM, A Berger <aberger7890@gmail.com> wrote:

I typed 1 : 3 (typo)
which ended ruby with "expecting end of input"
What does this mean?

--
[guy, jim, charlie].each {|him| remember.him do |as, often| as.you_can
- without end}
http://blog.rubybestpractices.com/

It means you didn’t read the output:

% ruby -e '1 : 3'
-e:1: syntax error, unexpected ':', expecting end-of-input
1 : 3
^

Please put more time and effort into your research before you spam a thousand people with your noise. You’ve been asked this multiple times by multiple people.

···

On February 10, 2016 at 11:36:58, A Berger (aberger7890@gmail.com) wrote:

Hi
I typed 1 : 3 (typo)
which ended ruby with "expecting end of input"
What does this mean?

I'd advise you to simply google these questions/ Visit stackoverflow/ or
read ruby docs as the nature of questions are relatively easy to answer via
some searching online.

···

On Wed, Feb 10, 2016 at 2:42 PM, A Berger <aberger7890@gmail.com> wrote:

Any experts?
Is : used anywhere?
What does :: do ( in difference to . ) ?
Thx Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

I think it's if shortcut. :: Use for namespaces. Please read docs and use
Google please.

···

10 февр. 2016 г. 10:42 PM пользователь "A Berger" <aberger7890@gmail.com> написал:

Any experts?
Is : used anywhere?
What does :: do ( in difference to . ) ?
Thx Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Hi
Yes Ive already read that, but its not clear, what the differences are
exactly.
I remember you can also use #method, but # is the comment-sign.
Berg

Used, sorry.

···

10 февр. 2016 г. 10:44 PM пользователь "Sergey Ryabov" <connacte@gmail.com> написал:

I think it's if shortcut. :: Use for namespaces. Please read docs and use
Google please.
10 февр. 2016 г. 10:42 PM пользователь "A Berger" <aberger7890@gmail.com> > написал:

Any experts?
Is : used anywhere?
What does :: do ( in difference to . ) ?
Thx Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

# almost comment-sign, exception #{}. #method meaning that it's instance
method of class. #method not used in code, this one used only in
documentation.

···

10 февр. 2016 г. 10:59 PM пользователь "A Berger" <aberger7890@gmail.com> написал:

Hi
Yes Ive already read that, but its not clear, what the differences are
exactly.
I remember you can also use #method, but # is the comment-sign.
Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Also, sorry for my bad English

···

10 февр. 2016 г. 11:06 PM пользователь "Sergey Ryabov" <connacte@gmail.com> написал:

# almost comment-sign, exception #{}. #method meaning that it's instance
method of class. #method not used in code, this one used only in
documentation.
10 февр. 2016 г. 10:59 PM пользователь "A Berger" <aberger7890@gmail.com> > написал:

Hi
Yes Ive already read that, but its not clear, what the differences are
exactly.
I remember you can also use #method, but # is the comment-sign.
Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;