lib/submodules/ably-ruby/lib/ably/modules/async_wrapper.rb in ably-rest-1.0.5 vs lib/submodules/ably-ruby/lib/ably/modules/async_wrapper.rb in ably-rest-1.0.6

- old
+ new

@@ -42,11 +42,11 @@ raise ArgumentError, 'Block required' unless block_given? Ably::Util::SafeDeferrable.new(logger).tap do |deferrable| deferrable.callback(&success_callback) if success_callback - operation_with_exception_handling = proc do + operation_with_exception_handling = lambda do begin yield rescue StandardError => err if custom_error_handling custom_error_handling.call err, deferrable @@ -55,10 +55,10 @@ deferrable.fail err end end end - complete_callback = proc do |result| + complete_callback = lambda do |result| deferrable.succeed result end EventMachine.defer operation_with_exception_handling, complete_callback end