:exit
mean?
a = 'This is the content of "a"'
b = eval(:a.id2name)
a.id == b.id
loop
a control structure?
Kernel
. The block which follows introduces
a new scope for local variables.
a +b
gives an error.
a(+b)
. Remove the space to the left of +
or add a space to the right of +
.
s = "x"; puts s *10
gives an error.
p {}
.
p({})
.
def pos= (val) print @pos,"\n"; @pos = val end
,
I cannot use the method pos = 1
.
=
appended are called in a receiver form. Invoke it as
self.pos = 1
.
'\1'
and '\\1'
?
\'
and
\\
are transformed and other combinations remain unchanged.
p true or true and false
prints true
, while
a=true if true or true and false
does not assign true
to a
.
(p true) or true and false
.
and/or
is not parsed as an element of the argument of p
but an element of an expression.
p(nil || "")
returns "", while p(nil or "")
gives parse error.
or
combines only expressions,
not arguments.
Try p nil or ""
and p((nil or ""))
.