lib/command.rb in dev_commands-0.0.6 vs lib/command.rb in dev_commands-0.0.7
- old
+ new
@@ -39,14 +39,15 @@
timer=Timer.new
if self[:input].include?('<%') && self[:input].include?('%>')
ruby = self[:input].gsub("<%","").gsub("%>","")
begin
- puts "eval(#{ruby})"
+ #puts "eval(#{ruby})"
self[:output]=eval(ruby)
rescue
- puts "unable to eval(#{ruby})"
- raise "unable to eval(#{ruby})"
+ #puts "unable to eval(#{ruby})"
+ #raise "unable to eval(#{ruby})"
+ self[:error]="unable to eval(#{ruby})"
end
self[:elapsed] = timer.elapsed_str
self[:end_time] = Time.now
else
\ No newline at end of file