diff --git a/README.md b/README.md index d7335e19..7707d966 100644 --- a/README.md +++ b/README.md @@ -1233,9 +1233,9 @@ First, install dependencies: # Optional: Change bundler install path to be local bundle config --local path $(pwd)/.bundle - bundle instal + bundle install -To build shared library for development use (ensure you have cloned submodules : +To build shared library for development use (ensure you have cloned submodules) : bundle exec rake compile diff --git a/temporalio/lib/temporalio/internal/worker/workflow_worker.rb b/temporalio/lib/temporalio/internal/worker/workflow_worker.rb index 6e194162..10b9ee5c 100644 --- a/temporalio/lib/temporalio/internal/worker/workflow_worker.rb +++ b/temporalio/lib/temporalio/internal/worker/workflow_worker.rb @@ -111,7 +111,7 @@ def initialize( disable_eager_activity_execution:, workflow_interceptors:, workflow_failure_exception_types: workflow_failure_exception_types.map do |t| - unless t.is_a?(Class) && t < Exception + unless t.is_a?(Class) && t <= Exception raise ArgumentError, 'All failure types must classes inheriting Exception' end diff --git a/temporalio/lib/temporalio/workflow/definition.rb b/temporalio/lib/temporalio/workflow/definition.rb index b0643c37..2f21f5e3 100644 --- a/temporalio/lib/temporalio/workflow/definition.rb +++ b/temporalio/lib/temporalio/workflow/definition.rb @@ -55,7 +55,7 @@ def workflow_raw_args(value = true) # rubocop:disable Style/OptionalBooleanParam # @param types [Array>] Exception types to turn into workflow failures. def workflow_failure_exception_type(*types) types.each do |t| - raise ArgumentError, 'All types must classes inheriting Exception' unless t.is_a?(Class) && t < Exception + raise ArgumentError, 'All types must classes inheriting Exception' unless t.is_a?(Class) && t <= Exception end @workflow_failure_exception_types ||= [] @workflow_failure_exception_types.concat(types)