ruby-changes:63212
From: Kazuhiro <ko1@a...>
Date: Wed, 30 Sep 2020 15:56:21 +0900 (JST)
Subject: [ruby-changes:63212] ce986b41ca (master): Remove unneeded `begin` and `end`
https://git.ruby-lang.org/ruby.git/commit/?id=ce986b41ca From ce986b41caa1f23b6d07914b8eca62fdff24e034 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Wed, 30 Sep 2020 15:55:07 +0900 Subject: Remove unneeded `begin` and `end` 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 https://github.com/ruby/ruby/blob/trunk/test/json/json_common_interface_test.rb#L160 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/