Skip to content

Play nicely with message forwarding#5

Closed
gf3 wants to merge 1 commit intotomstuart:masterfrom
gf3:respond-to-missing
Closed

Play nicely with message forwarding#5
gf3 wants to merge 1 commit intotomstuart:masterfrom
gf3:respond-to-missing

Conversation

@gf3
Copy link

@gf3 gf3 commented May 28, 2015

  • Indicate whether a value can properly respond to a message

@tomstuart
Copy link
Owner

Sorry, I had notifications turned off, so I only just noticed this.

This overlaps with #2, but your implementation is different. Which one is right?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather see expect(optional).to respond_to :challenge here, assuming that works.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh dang, i didn't even know there was a matcher for that. will update

* Indicate whether a value can properly respond to a message
@gf3 gf3 force-pushed the respond-to-missing branch from 36851e8 to 35b0838 Compare June 3, 2015 14:43
@gf3
Copy link
Author

gf3 commented Jun 3, 2015

@tomstuart updated the test. i don't think the within usage is necessary if we want this to play well with other ruby objects/libraries. of course it's up to you

@tomstuart
Copy link
Owner

@gf3 Thanks. What would the corresponding tests look like for Many and Eventually?

@gf3
Copy link
Author

gf3 commented Jun 3, 2015

@tomstuart ahh, i suppose we'd have to apply the respond_to? check to values and block respectively. alternatively we could use a common name for the stored value in each class.

@tomstuart
Copy link
Owner

@gf3 Well, that’s what within is for. :)

@gf3
Copy link
Author

gf3 commented Jun 3, 2015

@tomstuart oh my mistake—i thought it also re-wrapped values.

@gf3
Copy link
Author

gf3 commented Jun 3, 2015

@tomstuart the other PR is correct then

@tomstuart
Copy link
Owner

@gf3 It does — I’m being a bit flippant. I just mean that this implementation needs to work across all monads, so it’s going to have to use within (or similar) somehow.

@tomstuart
Copy link
Owner

This change is superseded by #10, so I’m closing it.

@tomstuart tomstuart closed this Feb 20, 2016
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

Successfully merging this pull request may close these issues.

2 participants