Skip to content

Commit

Permalink
prefer non-eval intern
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpenner committed Aug 1, 2014
1 parent 0251dcc commit 98bcbee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/ember-metal/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ var MANDATORY_SETTER = Ember.ENV.MANDATORY_SETTER;
@return {String} interned version of the provided string
*/
function intern(string) {
"use strict";
return new Function('return "' + string + '"')();
var obj = Object.create(null);
obj[string] = true;
return Object.keys(obj)[0];
}

/**
Expand Down

0 comments on commit 98bcbee

Please sign in to comment.