diff options
author | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2020-09-30 15:55:07 +0900 |
---|---|---|
committer | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2020-09-30 15:55:07 +0900 |
commit | ce986b41caa1f23b6d07914b8eca62fdff24e034 (patch) | |
tree | 304413bd953e20387c045be4f9d542f1c99deae8 /test/json | |
parent | 30bb040ea4718270e269fefdd0440940f2bdfc5d (diff) | |
download | ruby-ce986b41caa1f23b6d07914b8eca62fdff24e034.tar.gz |
Remove unneeded `begin` and `end`
Diffstat (limited to 'test/json')
-rw-r--r-- | test/json/json_common_interface_test.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/json/json_common_interface_test.rb b/test/json/json_common_interface_test.rb index f87eab0e9c..9148b78c8b 100644 --- a/test/json/json_common_interface_test.rb +++ b/test/json/json_common_interface_test.rb @@ -160,12 +160,10 @@ class JSONCommonInterfaceTest < Test::Unit::TestCase def temp_file_containing(text, file_prefix = '') raise "This method must be called with a code block." unless block_given? - begin - Tempfile.create(file_prefix) do |file| - file << text - file.close - yield file.path - end + Tempfile.create(file_prefix) do |file| + file << text + file.close + yield file.path end end end |