Skip to content

Commit

Permalink
Fix failure to execute multiple handlers for the same pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
mcorino committed Jun 12, 2021
1 parent 1ea69a4 commit 351c8f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ridl/delegate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def pragma_id(id, repo_id)
end

def handle_pragma(pragma_string)
unless @@pragma_handlers.values.any? {|h| h.call(self, @cur, pragma_string)}
unless @@pragma_handlers.values.reduce(false) {|rc, h| h.call(self, @cur, pragma_string) || rc }
IDL.log(1, "RIDL - unrecognized pragma encountered: #{pragma_string}.")
end
end
Expand Down

0 comments on commit 351c8f5

Please sign in to comment.