nadoka/nadoka — pull request #5 by shugo (2014-01-16 09:19:57+00:00)
Title: RuntimeError occurs when Nick is set to ENV['USER']

RuntimeError occurs when Nick is set to ENV['USER'].

14/01/16-16:22:09 [NDK] Exception RuntimeError - can't modify frozen String
14/01/16-16:22:09 [NDK] -- backtrace --
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/config.rb:509:in `force_enc
oding'
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/config.rb:509:in `block in
log_format_message'
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/config.rb:486:in `gsub'
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/config.rb:486:in `log_forma
t_message'
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/config.rb:467:in `log_forma
t'
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/logger.rb:32:in `log_format
'
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/logger.rb:69:in `logging'
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/logger.rb:230:in `clog_msgo
bj'
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/logger.rb:259:in `logging'
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/server.rb:670:in `send_to_c
lients_otherwise'
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/client.rb:237:in `send_from
_client'
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/client.rb:57:in `start'
14/01/16-16:22:09 [NDK] | /usr/home/shugo/nadoka/ndk/server.rb:368:in `block (2
levels) in start_clients_thread'
14/01/16-16:22:09 [NDK] Client Shugo Maeda@ disconnected.

log_format_message should copy m before calling force_encoding to avoid `RuntimeError - can't modify f
rozen String' when Nick is set to ENV['USER'], which is frozen.