Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

multiple parses show "warning: already initialized constant Kget" #31

Closed
zipizap opened this Issue Sep 21, 2011 · 2 comments

Comments

Projects
None yet
2 participants

zipizap commented Sep 21, 2011

If a program makes multiple citrus parses, then a ruby warning will be shown:

"...gems/citrus-2.4.0/lib/citrus/file.rb:56: warning: already initialized constant Kget"

This should be easy to fix (if constant is already defined, don't redefine it), but when I dived in the source code of file.rb, I've seen in line 56 that the constant definition uses metaprogramming, so I better leave the change for expert hands...

PD: The parser is fantastic :)
PD2: I've tested and seen that citrus is 10x faster in MRI-ruby than in Jruby - maybe it would be usefull to leave some tip in the readme about it

Owner

mjackson commented Sep 21, 2011

This behavior is intentional. It's designed to prevent you from loading the same grammar twice unnecessarily.

zipizap commented Oct 3, 2011

Ok, thanks for the info

@zipizap zipizap closed this Oct 3, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment