mirror of
https://github.com/ggml-org/whisper.cpp.git
synced 2026-10-18 04:35:33 +02:00
ruby : fix segmentation fault (#3591)
* Mark long live variable * Fix test for Whisper::Token#deconstruct_keys(nil) * Don't use long live variable * Fix indentation
This commit is contained in:
@@ -57,7 +57,9 @@ class TestToken < TestBase
|
||||
end
|
||||
|
||||
def test_deconstruct_keys_with_nil
|
||||
assert_equal({}, @token.deconstruct_keys(nil))
|
||||
keys = %i[id tid probability log_probability pt ptsum t_dtw voice_length start_time end_time text]
|
||||
expected = keys.collect {|key| [key, @token.send(key)] }.to_h
|
||||
assert_equal(expected, @token.deconstruct_keys(nil))
|
||||
end
|
||||
|
||||
def test_deconstruct_keys_with_keys
|
||||
|
||||
Reference in New Issue
Block a user