Skip to content

Commit

Permalink
Merge pull request #62 from mcorino/mco-fix-pragma-handling
Browse files Browse the repository at this point in the history
Fix failure to execute multiple handlers for the same pragma
  • Loading branch information
mcorino authored Jun 14, 2021
2 parents 1ea69a4 + 351c8f5 commit e06f6c7
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 e06f6c7

Please sign in to comment.