PageRenderTime 41ms CodeModel.GetById 16ms 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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. #!/usr/bin/env ruby
  2. #
  3. # Put description here
  4. #
  5. #
  6. #
  7. #
  8. #
  9. require 'swig_assert'
  10. require 'refcount'
  11. a = Refcount::A3.new;
  12. b1 = Refcount::B.new a;
  13. b2 = Refcount::B.new a;
  14. if a.ref_count() != 3
  15. print "This program will crash... now\n"
  16. end