[#80974] [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit — ko1@...
Issue #13517 has been updated by ko1 (Koichi Sasada).
4 messages
2017/05/02
[#81024] Re: [Ruby trunk Feature#13517] [PATCH] reduce rb_mutex_t size from 160 to 80 bytes on 64-bit
— SASADA Koichi <ko1@...>
2017/05/07
sorry for late response.
[#80996] [Ruby trunk Feature#13544] Allow loading an ISeqs sequence directly from a C extension without requiring buffer is in an RVALUE — sam.saffron@...
Issue #13544 has been reported by sam.saffron (Sam Saffron).
3 messages
2017/05/04
[#81016] [Ruby trunk Bug#13526] Segmentation fault at 0x0055c2e58e8920 ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux] — s.wanabe@...
Issue #13526 has been updated by wanabe (_ wanabe).
3 messages
2017/05/07
[#81048] Re: [ruby-cvs:65788] normal:r58614 (trunk): rb_execution_context_t: move stack, stack_size and cfp from rb_thread_t — SASADA Koichi <ko1@...>
It causes compile error on raspi 3.
3 messages
2017/05/09
[#81201] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle — "U.NAKAMURA" <usa@...>
Hi, Eric
4 messages
2017/05/16
[#81202] Re: [ruby-cvs:65935] normal:r58761 (trunk): test/test_extilibs.rb: do not check the existence of fiddle
— Eric Wong <normalperson@...>
2017/05/16
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#81427] Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534) — SASADA Koichi <ko1@...>
Hi,
6 messages
2017/05/28
[#81428] Re: Fwd: [ruby-changes:46809] normal:r58924 (trunk): test for IO.copy_stream CPU usage (r58534)
— Eric Wong <normalperson@...>
2017/05/28
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:81158] [Ruby trunk Bug#13564] Exception message management
From:
ko1@...
Date:
2017-05-15 07:30:39 UTC
List:
ruby-core #81158
Issue #13564 has been reported by ko1 (Koichi Sasada). ---------------------------------------- Bug #13564: Exception message management https://bugs.ruby-lang.org/issues/13564 * Author: ko1 (Koichi Sasada) * Status: Open * Priority: Normal * Assignee: matz (Yukihiro Matsumoto) * Target version: * ruby -v: * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- We can modify `Exception#message` if given String is not frozen. Should we continue this specification? Now, we can modify exception message with message string modification. ``` begin raise 'foo' ensure $!.message.replace 'bar' #=> Exception with message "bar" end ``` However, if we pass frozen string, it is not allowed. ``` begin raise 'foo'.freeze ensure $!.message.replace 'bar' #=> `replace': can't modify frozen String (RuntimeError) end ``` Furthermore, `# frozen_string_literal: true` freeze all of string literals. ``` # frozen_string_literal: true begin raise 'foo' ensure $!.message.replace 'bar' #=> `replace': can't modify frozen String (RuntimeError) end ``` # Background and motivation I want to add Exception message on ensure clause like the code in previous section. Just now, we need to re-raise another exception (with `raise($!.class, new_msg, $!.backtrace)`). I tried to modify `$!.message` and it works on small script. However, I try it on production (*1), it doesn't work because of `frozen_string_literal: true`. *1: https://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/rubygems/test_gem_gem_runner.rb?r1=58723&r2=58722&pathrev=58723 I think current behavior (specification?) is easy to misusing. # Ideas * (1) To prevent such behavior * (1-1) Freeze message strings at initialize * (1-2) Return copy string at `Exception#message` * (2) Provide `Exception#message = ` * And (1-1) or (1-2) * (3) Allow such behavior. If a frozen message is given, dup it and set as modifiable. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>