Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Removed custom String#starts_with? and #ends_with?#62

Merged
dennisreimann merged 3 commits intoopenid:masterfrom
tobiashm:master
Jan 7, 2015
Merged

Removed custom String#starts_with? and #ends_with?#62
dennisreimann merged 3 commits intoopenid:masterfrom
tobiashm:master

Conversation

@tobiashm
Copy link
Copy Markdown
Contributor

Since Ruby 1.8.7 and newer defines String#start_with? and #end_with?, and Ruby 1.8 support has been deprecated for this library, we can just use the build in methods and remove the extra code.

Tobias Haagen Michaelsen added 2 commits October 15, 2013 16:40
…port is deprecated.

The methods were introduced with Ruby 1.8.7 and 1.9.0, and since the library is now only targeted 1.9.2+ there is no need for this extra code.
@dennisreimann
Copy link
Copy Markdown
Contributor

Hello Tobias, can you make this work with the current version? I'll merge this once Travis gives thumbs up :)

@tobiashm
Copy link
Copy Markdown
Contributor Author

Looks like a problem with JRuby returning false for "".start_with?("") – all other implementations I've tested returns true, including Rubinius.

I will report to JRuby.

Conflicts:
	test/test_extras.rb
@tobiashm
Copy link
Copy Markdown
Contributor Author

tobiashm commented Jan 7, 2015

The issue with "".start_with?("") has been fixed in jruby-head.

dennisreimann added a commit that referenced this pull request Jan 7, 2015
Removed custom String#starts_with? and #ends_with?
@dennisreimann dennisreimann merged commit ff3acd6 into openid:master Jan 7, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants