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

Fixed the deprecation of Object#returning for Object#tap on Connection.url_for #51

Merged
merged 2 commits into from
May 29, 2012
Merged

Conversation

bokor
Copy link

@bokor bokor commented Jan 16, 2012

Signed-off-by: designwaves brian.bokor@designwaves.com

Signed-off-by: designwaves <brian.bokor@designwaves.com>
@marcel
Copy link
Owner

marcel commented Jan 17, 2012

Thanks for modernizing. As is though this breaks backwards compatibility with older versions of Ruby. The safe, though more tedious, way is to add String#tap in the extensions file iff String does not have an instance method 'tap'.

@bokor
Copy link
Author

bokor commented Jan 17, 2012

OH yes very true....forgot to check for that. Want me to update it?

@bokor
Copy link
Author

bokor commented Jan 17, 2012

Actually looked at the extensions file and not sure what I would add quite yet unless you have an idea of what I could add quickly. I'll have to look at it more later tonight or tomorrow.

@marcel
Copy link
Owner

marcel commented Jan 17, 2012

Something like this:

class String
  def tap
    # implementation ...
  end
end unless ''.respond_to?(:tap)

Signed-off-by: designwaves <brian.bokor@designwaves.com>
@bokor
Copy link
Author

bokor commented Jan 17, 2012

Updated the code and seems to be working fine (obviously you would have to give the go ahead but I think it is all good. Might want to make sure the tests run for you too cause I had some issues running the test cases so I built a test in my application and copied it

@bokor
Copy link
Author

bokor commented Jan 20, 2012

Marcel, does this look sufficient or would you like me to fix anything else in this pull request?

marcel added a commit that referenced this pull request May 29, 2012
Fixed the deprecation of Object#returning for Object#tap on Connection.url_for
@marcel marcel merged commit 34db3c0 into marcel:master May 29, 2012
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