Permalink
Browse files

Don't use strlen because we already know the actual size

  • Loading branch information...
1 parent e820a69 commit bff09f562acd5a390650826213266451e2d2069d @dbussink dbussink committed Mar 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 vm/builtin/system.cpp
View
2 vm/builtin/system.cpp
@@ -303,7 +303,7 @@ namespace rubinius {
if(use_sh) {
execl("/bin/sh", "sh", "-c", c_str, (char*)0);
} else {
- size_t c_size = strlen(c_str);
+ size_t c_size = str->byte_size();
size_t max_spaces = (c_size / 2) + 2;
char** args = new char*[max_spaces];

0 comments on commit bff09f5

Please sign in to comment.