Skip to content

Commit

Permalink
fix: putc should apply to_i to the value (thanks > kinaba)
Browse files Browse the repository at this point in the history
  • Loading branch information
yhara committed Apr 2, 2010
1 parent b52f1e7 commit 0685496
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/shogimodan/vm.rb
Expand Up @@ -47,9 +47,9 @@ def run
set(arg1, val)
when :putc
if defined?(Encoding) then
@stdout.print get(arg1).chr(Encoding::UTF_8)
@stdout.print get(arg1).to_i.chr(Encoding::UTF_8)
else
@stdout.print get(arg1).chr
@stdout.print get(arg1).to_i.chr
end
when :putn
@stdout.print get(arg1).to_s
Expand Down

0 comments on commit 0685496

Please sign in to comment.