Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhulik committed Aug 6, 2024
1 parent 19dd787 commit 00798fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion value.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func ToRuby[T any](mrb *GRuby, value T) Value {
switch any(value).(type) {
case string:
cstr := C.CString(val.(string)) //nolint:forcetypeassert
// defer C.free(unsafe.Pointer(cstr))
defer C.free(unsafe.Pointer(cstr))
return mrb.value(C.mrb_str_new_cstr(mrb.state, cstr))
case int, int16, int32, int64:
return mrb.value(C.mrb_fixnum_value(C.mrb_int(val.(int)))) //nolint:forcetypeassert
Expand Down

0 comments on commit 00798fe

Please sign in to comment.