Skip to content

Commit eec617f

Browse files
committed
Improved solve method
1 parent bf946f2 commit eec617f

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

‎ext/or-tools/constraint.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ void init_constraint(Rice::Module& m) {
471471
exception = e;
472472
stop = true;
473473
}
474-
callback.call("response=", Qnil);
474+
callback.call("response=", Object(Qnil));
475475
});
476476

477477
if (stop) {

‎lib/or_tools/cp_solver.rb‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ class CpSolver
88

99
def solve(model, observer = nil)
1010
@response = _solve(model, parameters, observer)
11-
@response.status
12-
ensure
13-
# avoid GC issue
1411
observer.response = @response if observer
12+
@response.status
1513
end
1614

1715
def value(var)

0 commit comments

Comments
 (0)