1
# Not sure if this is an IRB bug, but thought you guys should know.
3
# ** My Ruby version: ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
4
# ** Version of Rubygems: 1.3.5
5
# ** Version of the Curb gem: 0.6.6.0
8
# Transcript of IRB session:
9
# ------------------------------------------------------------------------------------------------------------------
10
# irb(main):001:0> a = {
11
# irb(main):002:1* :type => :pie,
12
# irb(main):003:1* :series => {
13
# irb(main):004:2* :names => [:a,:b],
14
# irb(main):005:2* :values => [70,30],
15
# irb(main):006:2* :colors => [:red,:green]
17
# irb(main):008:1* :output_format => :png
19
# => {:type=>:pie, :output_format=>:png, :series=>{:names=>[:a, :b], :values=>[70, 30], :colors=>[:red, :green]}}
20
# irb(main):010:0> post = []
22
# irb(main):011:0> require 'rubygems'
24
# irb(main):012:0> require 'curb'
26
# irb(main):013:0> include Curl
28
# irb(main):014:0> a.each_pair do |k,v|
29
# irb(main):015:1* post << PostField.content(k,v)
30
# irb(main):016:1> end
31
# => {:type=>:pie, :output_format=>:png, :series=>{:names=>[:a, :b], :values=>[70, 30], :colors=>[:red, :green]}}
32
# irb(main):017:0> post
33
# /usr/lib/ruby/1.8/irb.rb:302: [BUG] Segmentation fault
34
# ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
37
# ------------------------------------------------------------------------------------------------------------------
38
require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
40
class BugPostFieldsCrash2 < Test::Unit::TestCase
47
:colors => [:red,:green]
49
:output_format => :png
53
post << Curl::PostField.content(k,v)