aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/string_ext_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix missing dependencyJeremy Kemper2009-11-091-0/+1
|
* String#each_char is not needed for Ruby >= 1.8.7Xavier Noria2009-11-091-11/+0
|
* String#start_with? and String#end_with? are not needed for Ruby >= 1.8.7, ↵Xavier Noria2009-11-091-8/+0
| | | | leaves their plural aliases though
* String#bytesize is not needed for Ruby >= 1.8.7Xavier Noria2009-11-091-7/+0
|
* Switch to on-by-default XSS escaping for rails.Michael Koziarski2009-10-081-0/+86
| | | | | | | | | | | | This consists of: * String#html_safe! a method to mark a string as 'safe' * ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it * Calls to String#html_safe! throughout the rails helpers * a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB) * New ERB implementation based on erubis which uses a SafeBuffer instead of a String Hat tip to Django for the inspiration.
* Shush interpolation warningsJoshua Peek2009-09-131-2/+6
|
* Extract String#bytesize shimJeremy Kemper2009-08-011-0/+7
|
* * don't include String#% for Ruby 1.9Sven Fuchs2009-07-181-5/+8
| | | | | | | | | | * raise a KeyError exception for missing named interpolation args (like Ruby 1.9 does) * raise an ArgumentError when mixing named and unnamed placeholders (like Ruby 1.9 does) * improve docs and comply a bit more w/ Rails names/conventions [#2870 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Ruby 1.9 style String interpolation support for lower ruby versions. Thanks ↵Lawrence Pit2009-07-071-0/+62
| | | | | | to code from Masao Mutoh's GetText gem. [#2870 state:resolved] Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local>
* String #to_time and #to_datetime: handle fractional seconds [#864 ↵Jason Frey (Fryguy)2009-06-071-0/+3
| | | | state:resolved]
* Fix dependencies revealed by testing in isolationJeremy Kemper2009-04-221-0/+1
|
* Merge branch 'master' into cherryJeremy Kemper2009-04-201-0/+2
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: activesupport/CHANGELOG activesupport/lib/active_support/core_ext/class/delegating_attributes.rb activesupport/lib/active_support/core_ext/hash/conversions.rb activesupport/lib/active_support/core_ext/module/attribute_accessors.rb activesupport/lib/active_support/core_ext/string/multibyte.rb activesupport/lib/active_support/core_ext/time/calculations.rb activesupport/lib/active_support/deprecation.rb
| * Clearer String#first and #last edge cases. Fix that foo.first(0) == instead ↵Jeremy Kemper2009-04-171-0/+2
| | | | | | | | of foo.
* | Explicit test dependenciesJeremy Kemper2009-03-291-2/+1
| |
* | Explicit test dependenciesJeremy Kemper2009-03-281-0/+3
|/
* Allow String#parameterize to accept a separator [#2157 state:resolved]Sam Granieri2009-03-071-0/+18
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Switch to AS::TestCase for assert_deprecatedJeremy Kemper2008-11-151-2/+2
|
* Deprecated String#chars in favor of String#mb_chars.Manfred Stienstra2008-09-211-0/+6
|
* Move with_kcode helper to abstract_unit. Add tests for multibyte string ↵Manfred Stienstra2008-09-211-6/+47
| | | | extensions.
* Fix ActiveRecord::Base.quote_bound_value for ActiveSupper::Multibyte::Chars ↵Manfred Stienstra2008-09-111-0/+6
| | | | | | | | | | values. - Adds String#acts_like_string? - Adds Chars#acts_like_string? Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1029 state:committed]
* camelize(:lower) should always downcase first character. [#696 state:resolved]Amos King2008-08-221-0/+4
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Add String#squish and String#squish! to remove consecutive chunks of ↵Michael Koziarski2008-02-161-0/+17
| | | | | | whitespace. Closes #11123 [jordi, Henrik N] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8878 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: declare utf-8 file encodingJeremy Kemper2008-02-021-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Multibyte: skip String#each_char test for Ruby 1.9Jeremy Kemper2007-12-211-8/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8461 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: 'a'.ord == 'a'[0]Jeremy Kemper2007-12-151-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8403 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: prefer builtin String#starts_ and ends_with? if available ↵Jeremy Kemper2007-12-151-1/+9
| | | | | | [chuyeow] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8397 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Honor Ruby's default calendar reform setting when creating DateTime objects ↵Geoff Buesing2007-11-241-1/+9
| | | | | | via ActiveRecord's Time -> DateTime overflow, Time#time_with_datetime_fallback, Time#to_datetime, Date#to_datetime and String#to_datetime. Closes #10201 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Mark String#each_char test failing with Ruby 1.9Jeremy Kemper2007-09-271-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7656 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Extract InflectorTestCases so both inflector and string inflections tests ↵Jeremy Kemper2007-09-271-11/+14
| | | | | | can use them. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7655 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* String#to_time overflows to DateTime. Add String#to_datetime. Closes #8572.Jeremy Kemper2007-06-041-0/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Full test coverage for Inflector. Closes #7228.Jeremy Kemper2007-01-281-1/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* make sure the String::Access methods return strings, and not multibyte Char ↵Jamis Buck2006-10-131-0/+27
| | | | | | instances git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5299 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make core_ext/string/access.rb multibyte safe. Closes #6388 [Manfred Stienstra]Michael Koziarski2006-10-121-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5287 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4487@asus: jeremy | 2006-04-29 12:21:39 -0700Jeremy Kemper2006-07-081-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check whether @flash is defined? for warnings-safety. r4488@asus: jeremy | 2006-04-29 12:23:15 -0700 Check whether @flash is defined? for warnings-safety. Obviates nil? check. r4489@asus: jeremy | 2006-04-29 12:45:18 -0700 Check whether @session is defined? for warnings-safety. r4490@asus: jeremy | 2006-04-29 12:50:41 -0700 Check whether @rendering_runtime is defined? for warnings-safety. r4491@asus: jeremy | 2006-04-29 12:55:01 -0700 Check whether @_cycles is defined? for warnings-safety. r4492@asus: jeremy | 2006-04-29 12:59:19 -0700 Check whether instance variables are defined? for warnings-safety. r4493@asus: jeremy | 2006-04-29 13:14:09 -0700 Add nil @template to PrototypeHelperTest to suppress unitialized instance variable warning. r4494@asus: jeremy | 2006-04-29 13:31:34 -0700 Check whether @auto_index defined? for warnings-safety. r4495@asus: jeremy | 2006-04-29 13:32:24 -0700 Wrap content_columns redefinitions with silence_warnings. r4496@asus: jeremy | 2006-04-29 13:35:28 -0700 Wrap more redefinitions with silence_warnings. r4829@asus: jeremy | 2006-07-08 10:59:20 -0700 abstract unit, fix warnings r4830@asus: jeremy | 2006-07-08 11:06:12 -0700 Use parens to silence warning. r4831@asus: jeremy | 2006-07-08 11:06:48 -0700 Use parens to silence warning. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make String#last behave more like Array#last, i.e.Scott Barron2006-02-081-0/+6
| | | | | | | | "f".last(3) => "f" not "f".last(3) => nil git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3548 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add ActiveSupport::JSON and Object#to_json for converting Ruby objects to ↵Sam Stephenson2005-12-271-0/+10
| | | | | | JSON strings git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3356 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r3215@asus: jeremy | 2005-11-20 02:05:56 -0800Jeremy Kemper2005-11-211-5/+1
| | | | | | | Eliminate double-requires due to Ruby seeing different paths to the same file. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3127 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Kernel#silence_warnings and puts it into use throughout the frameworkDavid Heinemeier Hansson2005-09-111-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2179 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added String#starts_with? and String#ends_with? #2118 [thijs@vandervossen.net]David Heinemeier Hansson2005-09-091-0/+11
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2171 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added String#at, String#from, String#to, String#first, String#last in ↵David Heinemeier Hansson2005-09-031-0/+14
| | | | | | ActiveSupport::CoreExtensions::String::Access to ease access to individual characters and substrings in a string serving basically as human names for range access. Added easy extendability to the inflector through Inflector.inflections (using the Inflector::Inflections singleton class) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added String#to_time and String#to_date for wrapping ParseDateDavid Heinemeier Hansson2005-03-021-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@824 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Moved Active Support into its own gemDavid Heinemeier Hansson2005-02-151-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the meat for String inflectionDavid Heinemeier Hansson2005-01-151-0/+64
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@414 5ecf4fe2-1ee6-0310-87b1-e25e094e27de