The fix of the bug #608 introduced the following code:
def call_condition_proc(condition, object)
# This will evaluate lambda, proc & symbol and call it with 1 argument
return condition.to_proc.call(object) if condition.respond_to?(:to_proc)
# Else we send directly the object
condition
end
Relying on the duck typing of the existence of :to_proc this is now not valid anymore.
since a condition such as
@data = { some: 'info' }
node(:myNode, if: @data) { @data }
#> This used to return a node with the hash `{ some: 'info' }`
#> in 2.3.0 this returns nothing
Fix can be simply to replace duck typing by type checking:
...
return condition.to_proc.call(object) if condition.is_a?(Proc) || condition.is_a?(Symbol)
...
The fix in #608 is incompatible with ruby 2.3.0.
Hash#to_proc
working as follow
Relying on the duck typing of the existence of
:to_proc
this is now not valid anymore.since a condition such as
Fix can be simply to replace duck typing by type checking: