From 0c9ba9482acd5a36a512c7b17776a24cde62cd27 Mon Sep 17 00:00:00 2001 From: Chris Schmich Date: Thu, 19 Jan 2017 11:57:00 -0600 Subject: [PATCH] Add default behavior to combine_latest operator. --- lib/rx/operators/multiple.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rx/operators/multiple.rb b/lib/rx/operators/multiple.rb index 1db34f2..c10f095 100644 --- a/lib/rx/operators/multiple.rb +++ b/lib/rx/operators/multiple.rb @@ -116,6 +116,8 @@ def rescue_error(other = nil, &action) # Merges two observable sequences into one observable sequence by using the selector function whenever one of the observable sequences produces an element. def combine_latest(other, &result_selector) AnonymousObservable.new do |observer| + result_selector ||= lambda {|*inner_args| inner_args } + has_left = false has_right = false