Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions temporalio/.yardopts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
--readme README.md
--protected
--exclude sig/
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest YARD release added support for RBS files and ours currently trips them up. Will look into if we would benefit from starting to include these.

4 changes: 2 additions & 2 deletions temporalio/lib/temporalio/internal/bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ def self.assert_fiber_compatibility!
'see https://github.com/temporalio/sdk-ruby/issues/162'
end

def self.fibers_supported # rubocop:disable Naming/PredicateMethod
def self.fibers_supported
# We do not allow fibers on < 3.3 due to a bug we still need to dig
# into: https://github.com/temporalio/sdk-ruby/issues/162
major, minor = RUBY_VERSION.split('.').take(2).map(&:to_i)
!major.nil? && major >= 3 && !minor.nil? && minor >= 3
!major.nil? && !minor.nil? && (major > 3 || (major == 3 && minor >= 3))
end
end
end
Expand Down
15 changes: 15 additions & 0 deletions temporalio/test/worker_activity_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ def test_block
assert_equal 'Greetings, Block!', execute_activity(activity, 'Block')
end

class SimpleFiberActivity < Temporalio::Activity::Definition
activity_executor :fiber

def execute(name)
"Hello, #{name}!"
end
end

# Unconditionally assert fiber executor works for all supported Ruby versions support fibers
def test_simple_fiber_activity
Async do
assert_equal 'Hello, Fiber!', execute_activity(SimpleFiberActivity, 'Fiber')
end
end

class FiberActivity < Temporalio::Activity::Definition
attr_reader :waiting_notification, :result_notification

Expand Down
Loading