Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Bond Error: Failed during completion action #27

Closed
pmros opened this Issue · 4 comments

2 participants

@pmros

I have a project called troshka that use bond. It used to work fine but it fails lately. This is the error:

Bond Error: Failed during completion action '/^Object$/+/(\S+|\([^\)]*\)|'[^']*'|"[^"]*"|\/[^\/]*\/|(?:%q|%r|%Q|%w|%s|%)?\[[^\]]*\]|(?:proc|lambda|%q|%r|%Q|%w|%s|%)?\s*\{[^\}]*\})\.(\w*(?:\?|!)?)$/' with 'can't convert nil into String'.
Completion Info: Matches completion for object with ancestor matching /^Object$/.

I'm trying something like this:

Bond.agent.call '"".s'

Thank you for bond.

@pmros

I respond to myself. I have more information but no solution.
bond 0.4.2 works ok for me but 0.4.3 fails because this pull request [#25]. This line [https://github.com/cldwalker/bond/blob/master/lib/bond/missions/object_mission.rb#L41] launch a TypeException (can't convert nil to String). klass method returns eigen class ok but klass("").instance_methods give me that exception.

Sadly, I'm not be able to reproduce this error in few lines but bond fails this way in my project troshka [https://github.com/pmros/troshka]. I don't know why ruby launch that exception. Troshka doesn't redefine ruby core class methods.

Solution: You could catch TypeError exception at at default_action method, not only klass method.

Thank you again.

@cldwalker
Owner

Thanks for the bug report. I don't have time to look at this but I'm open to a pull with tests.

@pmros pmros referenced this issue
Closed

TypeError fix #28

@pmros

At last, I got it!
The problem is Qt4 library. A small script that reproduce the error:

require 'bond'
require 'Qt4'

Bond.start
l = Bond.agent.call '"".', '"".'
puts l

If you remove second line, it works OK.
Please accept my pull request.

@cldwalker
Owner

I'm closing since this isn't a Bond bug. If you figure out what Qt4 is doing that is causing the issue feel free to continue the conversation.

@cldwalker cldwalker closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.