summaryrefslogtreecommitdiff
path: root/test/json
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-09-30 15:55:07 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2020-09-30 15:55:07 +0900
commitce986b41caa1f23b6d07914b8eca62fdff24e034 (patch)
tree304413bd953e20387c045be4f9d542f1c99deae8 /test/json
parent30bb040ea4718270e269fefdd0440940f2bdfc5d (diff)
Remove unneeded `begin` and `end`
Diffstat (limited to 'test/json')
-rw-r--r--test/json/json_common_interface_test.rb10
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 f87eab0..9148b78 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