Changeset 6571
- Timestamp:
- 04/24/07 16:58:24 (3 years ago)
- Files:
-
- branches/1-2-stable/activerecord/CHANGELOG (modified) (1 diff)
- branches/1-2-stable/activerecord/lib/active_record/base.rb (modified) (1 diff)
- branches/1-2-stable/activesupport/CHANGELOG (modified) (1 diff)
- branches/1-2-stable/activesupport/lib/active_support/multibyte/chars.rb (modified) (3 diffs)
- trunk/activerecord/CHANGELOG (modified) (1 diff)
- trunk/activerecord/lib/active_record/base.rb (modified) (1 diff)
- trunk/activesupport/CHANGELOG (modified) (1 diff)
- trunk/activesupport/lib/active_support/multibyte/chars.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1-2-stable/activerecord/CHANGELOG
r6471 r6571 4 4 5 5 * SQLite: binary escaping works with $KCODE='u'. #7862 [tsuka] 6 7 * Improved cloning performance by relying less on exception raising #8159 [Blaine] 6 8 7 9 branches/1-2-stable/activerecord/lib/active_record/base.rb
r6471 r6571 2160 2160 def clone_attribute_value(reader_method, attribute_name) 2161 2161 value = send(reader_method, attribute_name) 2162 value.clone 2162 2163 case value 2164 when nil, Fixnum, true, false 2165 value 2166 else 2167 value.clone 2168 end 2163 2169 rescue TypeError, NoMethodError 2164 2170 value branches/1-2-stable/activesupport/CHANGELOG
r6428 r6571 2 2 3 3 * Update Dependencies to ignore constants inherited from ancestors. Closes #6951. [Nicholas Seckar] 4 5 * Improved multibyte performance by relying less on exception raising #8159 [Blaine] 4 6 5 7 branches/1-2-stable/activesupport/lib/active_support/multibyte/chars.rb
r5980 r6571 44 44 # Create a new Chars instance. 45 45 def initialize(str) 46 @string = (str.string rescue str)46 @string = str.respond_to?(:string) ? str.string : str 47 47 end 48 48 … … 71 71 begin 72 72 # Simulate methods with a ! at the end because we can't touch the enclosed string from the handlers. 73 if m.to_s =~ /^(.*)\!$/ 73 if m.to_s =~ /^(.*)\!$/ && handler.respond_to?($1) 74 74 result = handler.send($1, @string, *a, &b) 75 75 if result == @string … … 78 78 @string.replace result 79 79 end 80 elsif handler.respond_to?(m) 81 result = handler.send(m, @string, *a, &b) 80 82 else 81 result = handler.send(m, @string, *a, &b)83 result = @string.send(m, *a, &b) 82 84 end 83 rescue NoMethodError84 result = @string.send(m, *a, &b)85 85 rescue Handlers::EncodingError 86 86 @string.replace handler.tidy_bytes(@string) trunk/activerecord/CHANGELOG
r6549 r6571 1 1 *SVN* 2 3 * Improved cloning performance by relying less on exception raising #8159 [Blaine] 2 4 3 5 * Added ActiveRecord::Base.inspect to return a column-view like #<Post id:integer, title:string, body:text> [DHH] trunk/activerecord/lib/active_record/base.rb
r6549 r6571 2232 2232 def clone_attribute_value(reader_method, attribute_name) 2233 2233 value = send(reader_method, attribute_name) 2234 value.clone 2234 2235 case value 2236 when nil, Fixnum, true, false 2237 value 2238 else 2239 value.clone 2240 end 2235 2241 rescue TypeError, NoMethodError 2236 2242 value trunk/activesupport/CHANGELOG
r6546 r6571 1 1 *SVN* 2 3 * Improved multibyte performance by relying less on exception raising #8159 [Blaine] 2 4 3 5 * Use XSD-compatible type names for Hash#to_xml and make the converters extendable #8047 [Tim Pope] trunk/activesupport/lib/active_support/multibyte/chars.rb
r6044 r6571 44 44 # Create a new Chars instance. 45 45 def initialize(str) 46 @string = (str.string rescue str)46 @string = str.respond_to?(:string) ? str.string : str 47 47 end 48 48 … … 71 71 begin 72 72 # Simulate methods with a ! at the end because we can't touch the enclosed string from the handlers. 73 if m.to_s =~ /^(.*)\!$/ 73 if m.to_s =~ /^(.*)\!$/ && handler.respond_to?($1) 74 74 result = handler.send($1, @string, *a, &b) 75 75 if result == @string … … 78 78 @string.replace result 79 79 end 80 elsif handler.respond_to?(m) 81 result = handler.send(m, @string, *a, &b) 80 82 else 81 result = handler.send(m, @string, *a, &b)83 result = @string.send(m, *a, &b) 82 84 end 83 rescue NoMethodError84 result = @string.send(m, *a, &b)85 85 rescue Handlers::EncodingError 86 86 @string.replace handler.tidy_bytes(@string)