Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nPn- opened this issue Sep 6, 2017 · 1 comment

Comments

@nPn-
Copy link

nPn- commented Sep 6, 2017

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

@bittrance
Copy link
Contributor

I suppose BehaviorSubject is not much used 😕 . Fix in #109 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants