Project

General

Profile

Actions

Bug #5172

closed

[PATCH] bigdecimal: RB_GC_GUARD rb_inspect() output

Added by normalperson (Eric Wong) over 12 years ago. Updated over 12 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.4dev (2011-08-07 trunk 32885) [x86_64-linux]
Backport:
[ruby-core:38862]

Description

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


Files

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0