-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
I am playing with RxRuby, but I'm not sure that behavior of merge function is as expected.
Here is test code:
require './lib/rx'
count_stream = RX::Observable.range(1, 5)
fizz_stream = count_stream.select {|x| x % 3 == 0}.map {'Fizz'}
otherwise_stream = count_stream.select {|x| x % 3 != 0}
merged_stream = RX::Observable.merge(fizz_stream, otherwise_stream)
merged_stream.subscribe {|x| puts x}I think merge function of Rx keeps event order (RxMarbles ), so I expect the code outputs 1 2 Fizz 4 5, but the result is:
1
Fizz
2
4
5
Is this behavior expected?
Metadata
Metadata
Assignees
Labels
No labels