Skip to content

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

Merged
merged 2 commits into from May 29, 2012

2 participants

@bokor
bokor commented Jan 16, 2012

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

@bokor bokor Fixed deprecated returning to use tap instead on the Connection.url_for
Signed-off-by: designwaves <brian.bokor@designwaves.com>
2b2c980
@marcel
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
bokor commented Jan 17, 2012

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

@bokor
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
Owner
marcel commented Jan 17, 2012

Something like this:

class String
  def tap
    # implementation ...
  end
end unless ''.respond_to?(:tap)
@bokor bokor Updated Extensions to have string#tap and added test case
Signed-off-by: designwaves <brian.bokor@designwaves.com>
adfc3c9
@bokor
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
bokor commented Jan 20, 2012

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

@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
Something went wrong with that request. Please try again.