Skip to content

Commit 775d973

Browse files
committedSep 25, 2014
Avoid computing ‘$’+jsid twice
1 parent 2190459 commit 775d973

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎opal/corelib/runtime.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -641,9 +641,10 @@
641641

642642
var find_obj_super_dispatcher = function(obj, jsid, current_func) {
643643
var klass = obj.$$meta || obj.$$class;
644+
jsid = '$' + jsid;
644645

645646
while (klass) {
646-
if (klass.$$proto['$' + jsid] === current_func) {
647+
if (klass.$$proto[jsid] === current_func) {
647648
// ok
648649
break;
649650
}
@@ -660,7 +661,7 @@
660661

661662
// else, let's find the next one
662663
while (klass) {
663-
var working = klass.$$proto['$' + jsid];
664+
var working = klass.$$proto[jsid];
664665

665666
if (working && working !== current_func) {
666667
// ok

0 commit comments

Comments
 (0)
Please sign in to comment.