Calling to_s on a frozen Date instance results in 'can't modify frozen'
-----------------------------------------------------------------------
Key: JRUBY-1968
URL: http://jira.codehaus.org/browse/JRUBY-1968
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1RC1
Reporter: K Venkatasubramaniyan
Priority: Critical
You can reproduce this in irb via the following:
d = Date.today ; d.freeze ; d.to_s
The above should result in the following:
TypeError: can't modify frozen
from /home/msuser1/jruby-1.1RC1/lib/ruby/1.8/date.rb:1041:in `civil'
from (eval):4:in `civil'
from /home/msuser1/jruby-1.1RC1/lib/ruby/1.8/date.rb:1056:in `year'
from /home/msuser1/jruby-1.1RC1/lib/ruby/1.8/date/format.rb:230:in
`strftime'
from /home/msuser1/jruby-1.1RC1/lib/ruby/1.8/date/format.rb:201:in
`gsub'
from /home/msuser1/jruby-1.1RC1/lib/ruby/1.8/date/format.rb:201:in
`strftime'
from /home/msuser1/jruby-1.1RC1/lib/ruby/1.8/date/format.rb:201:in
`to_s'
from
/home/msuser1/workspace/ebanking/ops/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/core_ext/date/conversions.rb:17:in
`to_formatted_s'
from (irb):2:in `signal_status'
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email