Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Return properly encoded paths from Dir.entries

  • Loading branch information...
commit 21f04d4bcddadcd8e435c5c1f9967d6b250143d3 1 parent 677d5f6
@razielgn razielgn authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 vm/builtin/dir.cpp
View
5 vm/builtin/dir.cpp
@@ -86,7 +86,10 @@ namespace rubinius {
}
if(!entp) return cNil;
- return String::create(state, ent.d_name);
+
+ String* str = String::create(state, ent.d_name);
+ str->encoding(state, Encoding::default_external(state));
+ return str;
}
Object* Dir::control(STATE, Fixnum* kind, Integer* pos) {
Please sign in to comment.
Something went wrong with that request. Please try again.