Src/emitter.rb warning

Hi:

I am getting a wierd warning with some code I am running.
I cannot locate the portion of my code that is invoking the
warning since it is pointing to someplace I can’t find:

ruby -I . …/mycode.rb data/mii.iv
src/emitter.rb:404: warning: character class has `[’ without escape

I cannot find src/emitter.rb. It is not in my code, it is not
in the ruby source, nor is it in the ruby install directory.

I don’t know where else to look.
Is this a bug in the error message? Is it real?

Thanks

···


Jim Freeze

Nobody can be exactly like me. Sometimes even I have trouble doing
it.
– Tallulah Bankhead

ruby -I . …/mycode.rb data/mii.iv
src/emitter.rb:404: warning: character class has `[’ without escape

I cannot find src/emitter.rb. It is not in my code, it is not
in the ruby source, nor is it in the ruby install directory.

I don’t know where else to look.
Is this a bug in the error message? Is it real?

emitter.rb is part of YAML.

Search for a line like
while str =~ /^/([^/+)(?:[([^]]+)])?/
(I have it in line 271… my version of yaml is old),

and change the [^/ to [^/ . This should do it, I think.
Ruby issues this warning since 1.8 I think.

Thanks. Found and fixed the problem.

···

On Wednesday, 30 April 2003 at 0:13:41 +0900, Carlos wrote:

ruby -I . …/mycode.rb data/mii.iv
src/emitter.rb:404: warning: character class has `[’ without escape

I cannot find src/emitter.rb. It is not in my code, it is not
in the ruby source, nor is it in the ruby install directory.

I don’t know where else to look.
Is this a bug in the error message? Is it real?

emitter.rb is part of YAML.

Search for a line like
while str =~ /^/([^/+)(?:[([^]]+)])?/
(I have it in line 271… my version of yaml is old),

and change the [^/ to [^/ . This should do it, I think.
Ruby issues this warning since 1.8 I think.


Jim Freeze

Chicken Little only has to be right once.