@@ -216,7 +216,7 @@ var builtinHashInstanceMethods = []*BuiltinMethodObject{
216
216
return NULL
217
217
}
218
218
219
- if result .Target . isTruthy () {
219
+ if result .isTruthy () {
220
220
return TRUE
221
221
}
222
222
}
@@ -384,13 +384,13 @@ var builtinHashInstanceMethods = []*BuiltinMethodObject{
384
384
objectKey := t .vm .InitStringObject (stringKey )
385
385
result := t .builtinMethodYield (blockFrame , objectKey , value )
386
386
387
- booleanResult , isResultBoolean := result .Target . (* BooleanObject )
387
+ booleanResult , isResultBoolean := result .(* BooleanObject )
388
388
389
389
if isResultBoolean {
390
390
if booleanResult .value {
391
391
delete (hash .Pairs , stringKey )
392
392
}
393
- } else if result . Target != NULL {
393
+ } else if result != NULL {
394
394
delete (hash .Pairs , stringKey )
395
395
}
396
396
}
@@ -704,7 +704,7 @@ var builtinHashInstanceMethods = []*BuiltinMethodObject{
704
704
}
705
705
706
706
if blockFrame != nil {
707
- return t .builtinMethodYield (blockFrame , key ). Target
707
+ return t .builtinMethodYield (blockFrame , key )
708
708
}
709
709
return t .vm .InitErrorObject (errors .ArgumentError , sourceLine , "The value was not found, and no block has been provided" )
710
710
},
@@ -746,7 +746,7 @@ var builtinHashInstanceMethods = []*BuiltinMethodObject{
746
746
747
747
if ! ok {
748
748
if blockFrame != nil {
749
- value = t .builtinMethodYield (blockFrame , objectKey ). Target
749
+ value = t .builtinMethodYield (blockFrame , objectKey )
750
750
blockFramePopped = true
751
751
} else {
752
752
return t .vm .InitErrorObject (errors .ArgumentError , sourceLine , "There is no value for the key `%s`, and no block has been provided" , stringKey .value )
@@ -910,7 +910,7 @@ var builtinHashInstanceMethods = []*BuiltinMethodObject{
910
910
}
911
911
912
912
for k , v := range h .Pairs {
913
- result [k ] = t .builtinMethodYield (blockFrame , v ). Target
913
+ result [k ] = t .builtinMethodYield (blockFrame , v )
914
914
}
915
915
return t .vm .InitHashObject (result )
916
916
@@ -1005,7 +1005,7 @@ var builtinHashInstanceMethods = []*BuiltinMethodObject{
1005
1005
objectKey := t .vm .InitStringObject (stringKey )
1006
1006
result := t .builtinMethodYield (blockFrame , objectKey , value )
1007
1007
1008
- if result .Target . isTruthy () {
1008
+ if result .isTruthy () {
1009
1009
destinationPairs [stringKey ] = value
1010
1010
}
1011
1011
}
@@ -1179,8 +1179,7 @@ var builtinHashInstanceMethods = []*BuiltinMethodObject{
1179
1179
1180
1180
resultHash := make (map [string ]Object )
1181
1181
for k , v := range h .Pairs {
1182
- result := t .builtinMethodYield (blockFrame , v )
1183
- resultHash [k ] = result .Target
1182
+ resultHash [k ] = t .builtinMethodYield (blockFrame , v )
1184
1183
}
1185
1184
return t .vm .InitHashObject (resultHash )
1186
1185
0 commit comments