diff options
| author | jj | 2012-07-03 16:10:10 +0200 |
|---|---|---|
| committer | jj | 2012-07-03 16:13:15 +0200 |
| commit | a7a25b80a0349d967a762b66ef12132f256da879 (patch) | |
| tree | cb0b9ccad988062187a88869a752c1994e11159b /library/Core.cpp | |
| parent | 0bdff401ca75d85490db621be367c80068e8e448 (diff) | |
| download | dfhack-a7a25b80a0349d967a762b66ef12132f256da879.tar.gz dfhack-a7a25b80a0349d967a762b66ef12132f256da879.tar.bz2 dfhack-a7a25b80a0349d967a762b66ef12132f256da879.tar.xz | |
ruby: use the color_ostream argument from dfhack to output to dfhack-run
Diffstat (limited to 'library/Core.cpp')
| -rw-r--r-- | library/Core.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/Core.cpp b/library/Core.cpp index 09344135..59334906 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -281,7 +281,7 @@ static command_result runLuaScript(color_ostream &out, std::string name, vector< return ok ? CR_OK : CR_FAILURE; } -static command_result runRubyScript(PluginManager *plug_mgr, std::string name, vector<string> &args) +static command_result runRubyScript(color_ostream &out, PluginManager *plug_mgr, std::string name, vector<string> &args) { std::string rbcmd = "$script_args = ["; for (size_t i = 0; i < args.size(); i++) @@ -290,7 +290,7 @@ static command_result runRubyScript(PluginManager *plug_mgr, std::string name, v rbcmd += "load './hack/scripts/" + name + ".rb'"; - return plug_mgr->eval_ruby(rbcmd.c_str()); + return plug_mgr->eval_ruby(out, rbcmd.c_str()); } command_result Core::runCommand(color_ostream &out, const std::string &command) @@ -632,7 +632,7 @@ command_result Core::runCommand(color_ostream &con, const std::string &first, ve if (fileExists(filename + ".lua")) res = runLuaScript(con, first, parts); else if (plug_mgr->eval_ruby && fileExists(filename + ".rb")) - res = runRubyScript(plug_mgr, first, parts); + res = runRubyScript(con, plug_mgr, first, parts); else con.printerr("%s is not a recognized command.\n", first.c_str()); } |
