Can not puts '\c' in irb

R

Ronald Fischer

irb 0.9.5 for Windows:

irb(main):016:0> puts '\c'
irb(main):017:0'

i.e. irb expects a continuation line. Guess this is a bug?

In case someone has a more recent release of irb, does this still=20
occur in the newer one?=20

Ronald Fischer

--=20
Ronald Fischer <[email protected]>
Phone: +49-89-452133-162
 
L

Lloyd Linklater

Ronald said:
irb 0.9.5 for Windows:

irb(main):016:0> puts '\c'
irb(main):017:0'

i.e. irb expects a continuation line. Guess this is a bug?

Ronald Fischer

What about

puts "\\c"
 
A

Ari Brown

You need to use double quotes " " instead of single quotes ' '
because you're dealing with an escape sequence (I assume).

But this is just my random guess at the solution to your problem...
so..... keep it ruby :)


irb 0.9.5 for Windows:

irb(main):016:0> puts '\c'
irb(main):017:0'

i.e. irb expects a continuation line. Guess this is a bug?

In case someone has a more recent release of irb, does this still
occur in the newer one?

Ronald Fischer

---------------------------------------------------------------|
~Ari
"I don't suffer from insanity. I enjoy every minute of it" --1337est
man alive
 
R

Ronald Fischer

Ronald said:
=20
What about
=20
puts "\\c"

This works, but that's not the point. The fact is that
puts '\c' works inside a Ruby program, but does not work
within irb.

Does anyone know whether this this a known limiation of irb, or a bug?

Ronald
--=20
Ronald Fischer <[email protected]>
Phone: +49-89-452133-162
 
R

Ronald Fischer

This works, but that's not the point. The fact is that
=20
This is a bug of irb. I fix this bug in ruby-trunk(Ruby-1.9).

Thank you! I had overlooked your reply and have in the meantime=20
already opened a bug report on the Ruby bug tracker (id 12868) :-(

Ronald
--=20
Ronald Fischer <[email protected]>
Phone: +49-89-452133-162
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top