aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend/string.rb
AgeCommit message (Collapse)Author
2014-09-28Make inreplace errors fatalJack Nagel
Closes #32649. Closes #32703.
2014-09-27Intercept calls to sub! in inreplace blocksJack Nagel
2014-09-26Clean up inreplace regexpsJack Nagel
- use literal syntax - escape interpolated variables - remove intermediate variables - remove unnecessary capture
2014-05-02Fix for String#undentBaptiste Fontaine
Without it, String#undent would fail on unindented strings, e.g.: "foo".undent NoMethodError: undefined method `length' for nil:NilClass` Closes #28873. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2014-03-27extend/string: backport #rpartitionMisty De Meo
2013-07-19Add String#end_with?Jack Nagel
I'm tired of not remembering if start_with?/end_with? are portable, so just add them both if they're not defined.
2013-07-19Fix String#start_with? implementationJack Nagel
It is supposed to accept a variable number of prefixes, and also to check if they are convertible to strings. This matches behavior documented in RubySpec.
2013-02-15Remove redundant returnJack Nagel
2013-02-15Make this more idiomaticJack Nagel
2012-08-29Record HEAD SHA and date of installs in receiptMax Howell
2012-08-14Improve libiconv diagnostic and suggestionMax Howell
This is coming up a lot at the moment, so here is an attempt to be more helpful.
2012-02-25inreplace: also warn on plain gsub! usageAdam Vandenberg
2012-02-25inreplace: warn if no substitutions were madeJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-07-27Coerce flags to an array in `remove_make_var!`Trevor Wennblom
This is needed for Ruby 1.9.x compatibility, but we still don't support running Homebrew with anything other than a system provided 1.8.[67]. Fixes #6546 Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-06-19back-port start_with? from 1.8.7Adam Vandenberg
This allows its use in Leopard, which has Ruby 1.8.6.
2011-03-12Move string extensionsAdam Vandenberg
2010-10-30fix warnings: ambiguous first argJamie Macey
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-17extract undent test to test caseMichael Morgan
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-03-07String.undent for prettier HEREDOCsMax Howell