Skip to content

Commit

Permalink
Remove reflect dependency in findOrigin
Browse files Browse the repository at this point in the history
  • Loading branch information
elct9620 committed Aug 8, 2024
1 parent 1181178 commit dc7ce48
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions class.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package mruby

import (
"fmt"
"reflect"
)

var (
Expand Down Expand Up @@ -257,8 +256,7 @@ func (mrb *State) checkInheritable(super RClass) {
}

func findOrigin(class RClass) RClass {
isNilClass := reflect.ValueOf(class).IsNil()
if isNilClass {
if class == nil {
return nil
}

Expand Down

0 comments on commit dc7ce48

Please sign in to comment.