zerowidth / camper_van

A Campfire to IRC bridge
MIT License
129 stars 25 forks source link

Fix issue where $1 seems to be set to nil #10

Closed tru closed 12 years ago

tru commented 12 years ago

This is a strange on. $1 seemed to be set to nil after the first time you accessed it. Guess the global regexp matching group was reset or something. So I just stored the value in a local buffer and it worked.

zerowidth commented 12 years ago

Do you have a way of reproducing this? $1 should remain valid until the next regex...

tru commented 12 years ago

It happens everytime for me. Plain Ubuntu 12.04 with ruby1.8

zerowidth commented 12 years ago

Ah! I wrote camper_van for ruby 1.9. Try that.

tru commented 12 years ago

That fixed most of my problems. Thanks! Maybe it should be better documented that 1.9 is required?

tru commented 12 years ago

Just realized that it's just me that has to learn to read better :-)

zerowidth commented 12 years ago

Latest gemspec (as of yet unreleased) now restricts the ruby version to 1.9, so this shouldn't happen again!