-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite loop when viewing console output #8
Comments
Wylan, Have you been able to come up with a better work around instead of commenting out the line? |
Hi Marty, I've been pretty busy so I haven't had a chance to dive deeper into it yet, but hopefully I will this weekend. |
So I had a little more time to look into the issue and it seems that changing #{next_repeat.inspect} to #{next_repeat} avoids the issue, but again the output is not super legible. |
This is very helpful. I'm trying to see if I can free up some time this I think this may stem from the newer version of Ruby (although I may be Marty On Tue, 2015-04-14 at 09:25 -0700, Wylan wrote:
|
I'm glad to be able to help, we using the gem in a project at work so I am able to take some time during the day to look into it. I too suspect that the ruby version has something to do with it since we didnt have issues before upgrading to 2.1, although I'm not sure exactly what changed. I do think I may have found a decent workaround though. It seems that it was looping in loop.rb (hows that for a pun?). If I copy the inspect method into loop.rb, but remove the call to super.inspect it seems to work. Also the output is not missing anything so far as I can tell. # inspect in loop.rb
def inspect
"#{self.class.to_s.sub(/^.*::/, '')} (#{name}) #{repeats} =<#{parsed_str}, #{next_repeat.inspect}> ".gsub(/\\*\"/, '"')
end
# inspect in base.rb
def inspect
"#{self.class.to_s.sub(/^.*::/, '')} (#{name}) #{repeats} #{super.inspect[1..-2]} =<#{parsed_str}, #{next_repeat.inspect}> ".gsub(/\\*\"/, '"')
end |
I had some time this morning to research differences with inspect I think what is happening is from the loop class, the base class inspect Your monkey patch makes sense. I'm going to bring it into code base and Marty On Wed, 2015-04-15 at 08:49 -0700, Wylan wrote:
|
Version 1.5.1 of pd_x12 is available on rubygems.org On Wed, 2015-04-15 at 08:49 -0700, Wylan wrote:
|
Glad I was able to help, I just updated to 1.5.1 and everything seems to be working as expected. |
After updating the the latest version of the gem we have encountered an issue when trying to parse a document via the console. The console will hang until
ctrl+c
is pressed. Reverting to the older version seems to resolve the issue.I believe it is being caused by line 54 in base.rb, commenting out
super.inspect
seems to resolve the issue, but the output is less legible. The project is using Ruby 2.1.4.The text was updated successfully, but these errors were encountered: