Skip to content

Commit

Permalink
prototype: Fix Function#argumentNames for IE
Browse files Browse the repository at this point in the history
  • Loading branch information
sstephenson committed Aug 9, 2007
1 parent 220f637 commit e75cd0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
@@ -1,6 +1,6 @@
*SVN*

* Fix Function#argumentNames for Opera [Thomas Fuchs]
* Fix Function#argumentNames for Opera and IE. [Thomas Fuchs]

* Add Object.isString, Object.isNumber, and Object.isUndefined, and clean up the source to make use of Object.isXXX where possible. [sam]

Expand Down
2 changes: 1 addition & 1 deletion src/base.js
Expand Up @@ -154,7 +154,7 @@ Object.extend(Object, {

Object.extend(Function.prototype, {
argumentNames: function() {
var names = this.toString().match(/^\s*function\s*\((.*?)\)/)[1].split(",").invoke("strip");
var names = this.toString().match(/^[\s\(]*function\s*\((.*?)\)/)[1].split(",").invoke("strip");
return names.length == 1 && !names[0] ? [] : names;
},

Expand Down

0 comments on commit e75cd0a

Please sign in to comment.