Skip to content

Commit

Permalink
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions machine/builtin/dir.cpp
Original file line number Diff line number Diff line change
@@ -89,16 +89,16 @@ namespace rubinius {
guard(state);

struct dirent* entp = nullptr;
String* str = nullptr;

{
std::lock_guard<locks::spinlock_mutex> guard(readdir_lock_);

entp = readdir(os());
}
if(!(entp = readdir(os()))) return cNil;

if(!entp) return cNil;
str = String::create(state, entp->d_name);
}

String* str = String::create(state, entp->d_name);
str->encoding(state, encoding());

return str;

0 comments on commit c1fb361

Please sign in to comment.