summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/timeout.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f2f1186be3..cb94fb876a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug 13 22:49:42 2015 Juanito Fatas <[email protected]>
+
+ * lib/timeout.rb (Timeout#timeout): freeze a string message to
+ reduce string allocations. [Fix GH-996]
+
Thu Aug 13 17:42:34 2015 Koichi Sasada <[email protected]>
* vm_core.h (rb_call_info_kw_arg_bytes): move the definition
diff --git a/lib/timeout.rb b/lib/timeout.rb
index 20a594898f..63a629923d 100644
--- a/lib/timeout.rb
+++ b/lib/timeout.rb
@@ -71,7 +71,7 @@ module Timeout
# a module method, so you can call it directly as Timeout.timeout().
def timeout(sec, klass = nil) #:yield: +sec+
return yield(sec) if sec == nil or sec.zero?
- message = "execution expired"
+ message = "execution expired".freeze
e = Error
bl = proc do |exception|
begin