ruby-changes:60745
From: Nobuyoshi <ko1@a...>
Date: Sat, 11 Apr 2020 15:13:27 +0900 (JST)
Subject: [ruby-changes:60745] aade69eaf8 (master): Removed unnecessary `to_a` call
https://git.ruby-lang.org/ruby.git/commit/?id=aade69eaf8 From aade69eaf8f3b08f228f4ac3fbe9c3667f106f4d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 11 Apr 2020 11:58:49 +0900 Subject: Removed unnecessary `to_a` call `Dir.entries` returns an array. diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index 13a0c31..a3242a6 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -318,7 +318,7 @@ class TestDir < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_dir.rb#L318 def test_entries assert_entries(Dir.open(@root) {|dir| dir.entries}) - assert_entries(Dir.entries(@root).to_a) + assert_entries(Dir.entries(@root)) assert_raise(ArgumentError) {Dir.entries(@root+"\0")} end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/