From 94ab3e427fbeb5c855539fe2b962942be630aba3 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 30 Nov 2010 18:46:06 +0100 Subject: poll: cope with gettext frozen string Some gettext versions freeze the string they return, so dup them before modifying them. --- data/rbot/plugins/poll.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data') diff --git a/data/rbot/plugins/poll.rb b/data/rbot/plugins/poll.rb index 4109321d..086a9297 100644 --- a/data/rbot/plugins/poll.rb +++ b/data/rbot/plugins/poll.rb @@ -87,7 +87,7 @@ class ::Poll end def options - options = _("options are: ") + options = _("options are: ").dup @answers.each { |letter, info| options << "#{Bold}#{letter}#{NormalText}) #{info[:value]} " } @@ -201,7 +201,7 @@ class PollPlugin < Plugin command = _("poll vote %{id} ") % { :id => poll.id } - instructions = _("you have %{duration}, vote with ") + instructions = _("you have %{duration}, vote with ").dup instructions << _("%{priv} or %{public}") m.reply instructions % { :duration => "#{Bold}#{target_duration}#{Bold}", -- cgit v1.2.3