PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/ruby/refcount_runme.rb

#
Ruby | 21 lines | 8 code | 5 blank | 8 comment | 2 complexity | 5fe661385c6d8554647a925679acac15 MD5 | raw file
 1#!/usr/bin/env ruby
 2#
 3# Put description here
 4#
 5# 
 6# 
 7# 
 8#
 9
10require 'swig_assert'
11
12require 'refcount'
13
14
15a = Refcount::A3.new;
16b1 = Refcount::B.new a;
17b2 = Refcount::B.new a;
18
19if a.ref_count() != 3 
20  print "This program will crash... now\n"
21end