Skip to content

BehaviorSubject fails due to call to private member of nested inner class InnerSubscription #107

@nPn-

Description

@nPn-

The following code generates this traceback:

/var/lib/gems/2.1.0/gems/rx-0.0.3/lib/rx/subjects/behavior_subject.rb:80:in `block in on_next': private method `check_unsubscribed' called for #<Rx::BehaviorSubject:0x129b0d0> (NoMethodError)
	from /var/lib/gems/2.1.0/gems/rx-0.0.3/lib/rx/subjects/behavior_subject.rb:79:in `synchronize'
	from /var/lib/gems/2.1.0/gems/rx-0.0.3/lib/rx/subjects/behavior_subject.rb:79:in `on_next'
	from behavior_example.rb:3:in `<main>
require 'rx'
subject = Rx::BehaviorSubject.new 0
subject.on_next(0)
subject.as_observable.subscribe { puts "hello" }

when run using ruby 2.1.5p273 (2014-11-13) [arm-linux-gnueabihf]
(on a raspberrypi 3)

Is there a reason the method is marked private? It seems to work fine if I comment out the private keyword

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions