ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: ruby-core@ruby-lang.org
Subject: [ruby-core:38862] [Ruby 1.9 - Bug #5172][Open] [PATCH] bigdecimal: RB_GC_GUARD rb_inspect() output
Date: Tue, 9 Aug 2011 08:46:53 +0900	[thread overview]
Message-ID: <redmine.issue-5172.20110809084652@ruby-lang.org> (raw)


Issue #5172 has been reported by Eric Wong.

----------------------------------------
Bug #5172: [PATCH] bigdecimal: RB_GC_GUARD rb_inspect() output
http://redmine.ruby-lang.org/issues/5172

Author: Eric Wong
Status: Open
Priority: Normal
Assignee: 
Category: ext
Target version: 1.9.x
ruby -v: ruby 1.9.4dev (2011-08-07 trunk 32885) [x86_64-linux]


ext/bigdecimal/bigdecimal.c: RB_GC_GUARD rb_inspect() output

We can't directly use RSTRING_PTR() on rb_inspect() because the
GC may collect the VALUE returned by rb_inspect().  This is a
problem for Symbols with long names that return non-embedded
Strings when inspected.

test/bigdecimal/test_bigdecimal.rb (test_gc): updated for BigDecimal#coerce
test/bigdecimal/test_bigmath.rb (test_gc): added test case



-- 
http://redmine.ruby-lang.org

             reply	other threads:[~2011-08-08 23:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08 23:46 Eric Wong [this message]
2011-08-08 23:51 ` [ruby-core:38863] Re: [Ruby 1.9 - Bug #5172][Open] [PATCH] bigdecimal: RB_GC_GUARD rb_inspect() output Eric Wong
2011-08-08 23:54 ` [ruby-core:38864] [Ruby 1.9 - Bug #5172] " Kenta Murata
2011-08-17  1:51 ` [ruby-core:38999] " Kenta Murata

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-5172.20110809084652@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).