Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Bond Error: Failed during completion action #27

pmros opened this Issue December 30, 2012 · 4 comments

2 participants

Patricio M. Ros Gabriel Horner
Patricio M. Ros

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: '"".s'

Thank you for bond.

Patricio M. Ros

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 [] 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 []. 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.

Gabriel Horner

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

Patricio M. Ros pmros referenced this issue January 27, 2013

TypeError fix #28

Patricio M. Ros

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

require 'bond'
require 'Qt4'

l = '"".', '"".'
puts l

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

Gabriel Horner cldwalker closed this January 01, 2014
Gabriel Horner

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.

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.