Removes a crash related to include method
Needs ReviewPublic

Authored by Smar on Mon, Nov 26, 6:54 AM.

Details

Reviewers
None
Group Reviewers
KDevelop
Summary

There is a crash that occurs at least with Cucumber tests in a code like

Then("{string}") do |string|

expect(foo).to include string

end

that is caused by kdev-ruby to recognize include function as a mixin insert rather than a method.

This commit makes the crash disappear, but I don’t know kdev-ruby (nor kdevplatform’s API) well, so there may be some better solution to this problem. Please say if there is something I should do differently.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
Smar created this revision.Mon, Nov 26, 6:54 AM
Restricted Application added a project: KDevelop. · View Herald TranscriptMon, Nov 26, 6:54 AM
Restricted Application added a subscriber: kdevelop-devel. · View Herald Transcript
Smar requested review of this revision.Mon, Nov 26, 6:54 AM
apol added a subscriber: apol.Mon, Nov 26, 12:37 PM
apol added inline comments.
duchain/builders/usebuilder.cpp
90–95

This doesn't look like a to do item. The context should already be created anyway.

95

assert after if doesn't make any sense.

Smar added inline comments.Mon, Nov 26, 1:10 PM
duchain/builders/usebuilder.cpp
90–95

Okay, good to know. I wasn’t sure so I added a todo to remind myself that I should check it later. Related, should I also remove the latter todo?

95

Yes, sorry for sloppy work.

Smar updated this revision to Diff 46260.Mon, Nov 26, 1:11 PM

Fixed the things specified in comments.