Can not puts '\c' in irb

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

···

--
Ronald Fischer <ronald.fischer@venyon.com>
Phone: +49-89-452133-162

Ronald Fischer wrote:

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"

···

--
Posted via http://www.ruby-forum.com/\.

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 :slight_smile:

···

On Aug 6, 2007, at 9:26 AM, Ronald Fischer wrote:

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

--
Ronald Fischer <ronald.fischer@venyon.com>
Phone: +49-89-452133-162

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

Ronald Fischer wrote:
> 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"

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

···

--
Ronald Fischer <ronald.fischer@venyon.com>
Phone: +49-89-452133-162

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?

This is a bug of irb. I fix this bug in ruby-trunk(Ruby-1.9).

-- keiju

>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?

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
already opened a bug report on the Ruby bug tracker (id 12868) :frowning:

Ronald

···

--
Ronald Fischer <ronald.fischer@venyon.com>
Phone: +49-89-452133-162