Skip to content

Commit

Permalink
Update Prototype in RC to [5550]
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-pre-release@5552 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
madrobby committed Nov 17, 2006
1 parent bef626e commit 23569d8
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*SVN*

* Update to Prototype 1.5.0_rc2 [5550] which makes it work in Opera again [Thomas Fuchs]

* Reuse named route helper module between Routing reloads. Use remove_method to delete named route methods after each load. Since the module is never collected, this fixes a significant memory leak. [Nicholas Seckar]

* Deprecate standalone components. [Jeremy Kemper]
Expand Down
24 changes: 24 additions & 0 deletions actionpack/lib/action_view/helpers/javascripts/prototype.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ Object.extend(String.prototype, {
return camelizedString;
},

underscore: function() {
return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'-').toLowerCase();
},

dasherize: function() {
return this.gsub(/_/,'-');
},

inspect: function(useDoubleQuotes) {
var escapedString = this.replace(/\\/g, '\\\\');
if (useDoubleQuotes)
Expand Down Expand Up @@ -580,6 +588,22 @@ Object.extend(Array.prototype, {
});

Array.prototype.toArray = Array.prototype.clone;

if(window.opera){
Array.prototype.concat = function(){
var array = [];
for(var i = 0, length = this.length; i < length; i++) array.push(this[i]);
for(var i = 0, length = arguments.length; i < length; i++) {
if(arguments[i].constructor == Array) {
for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
array.push(arguments[i][j]);
} else {
array.push(arguments[i]);
}
}
return array;
}
}
var Hash = {
_each: function(iterator) {
for (var key in this) {
Expand Down
2 changes: 2 additions & 0 deletions railties/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*SVN*

* Update to Prototype 1.5.0_rc2 [5550] which makes it work in Opera again [Thomas Fuchs]

* Make sure that exceptions which are thrown outside of the user code try their best to be handeled in ApplicationController#rescue_action [Tobias Luetke]

* Rails::VERSION::STRING should always be available without having to require 'rails/version'. #6244 [fearoffish]
Expand Down
24 changes: 24 additions & 0 deletions railties/html/javascripts/prototype.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ Object.extend(String.prototype, {
return camelizedString;
},

underscore: function() {
return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'-').toLowerCase();
},

dasherize: function() {
return this.gsub(/_/,'-');
},

inspect: function(useDoubleQuotes) {
var escapedString = this.replace(/\\/g, '\\\\');
if (useDoubleQuotes)
Expand Down Expand Up @@ -580,6 +588,22 @@ Object.extend(Array.prototype, {
});

Array.prototype.toArray = Array.prototype.clone;

if(window.opera){
Array.prototype.concat = function(){
var array = [];
for(var i = 0, length = this.length; i < length; i++) array.push(this[i]);
for(var i = 0, length = arguments.length; i < length; i++) {
if(arguments[i].constructor == Array) {
for(var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
array.push(arguments[i][j]);
} else {
array.push(arguments[i]);
}
}
return array;
}
}
var Hash = {
_each: function(iterator) {
for (var key in this) {
Expand Down

0 comments on commit 23569d8

Please sign in to comment.