Skip to content

Commit

Permalink
Allow empty functions in Function problem
Browse files Browse the repository at this point in the history
Support boolean events.
  • Loading branch information
Maumagnaguagno committed May 15, 2024
1 parent 03116e6 commit 522f171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/experiments/Function.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Function

def problem(state, *args)
function = state[:function] = {}
state.delete('function').each {|f,v| function[f] = v.to_f}
state.delete('function')&.each {|f,v| function[f] = v.to_f}
state['protect_axiom'] ||= []
super
end
Expand Down

0 comments on commit 522f171

Please sign in to comment.