MacRuby : bug : regexp
Expect
$ ruby19 -e 'Regexp.allocate.to_s'
-e:1:in `to_s': uninitialized Regexp (TypeError)
from -e:1:in `<main>'
Result
$ macruby -e 'Regexp.allocate.to_s'
Assertion failed: (RREGEXP(re)->pattern != NULL), function rb_reg_options, file re.c, line 1228.
zsh: abort macruby -e 'Regexp.allocate.to_s'
require 'test/unit/assertions.rb'
include Test::Unit::Assertions
assert_raises(TypeError){ Regexp.allocate.hash }
assert_raises(TypeError){ Regexp.allocate.eql? Regexp.new('') }
assert_raises(TypeError){ Regexp.new('').eql? Regexp.allocate }
assert_raises(TypeError){ Regexp.allocate == Regexp.new('') }
assert_raises(TypeError){ Regexp.new('') == Regexp.allocate }
assert_raises(TypeError){ Regexp.allocate =~ "foo" }
assert_raises(TypeError){ Regexp.allocate === "foo" }
assert_raises(TypeError){ Regexp.allocate.match "foo" }
assert_raises(TypeError){ Regexp.allocate.to_s }
assert_raises(TypeError){ Regexp.allocate.source }
assert_raises(TypeError){ Regexp.allocate.casefold? }
assert_raises(TypeError){ Regexp.allocate.names }
assert_raises(TypeError){ Regexp.allocate.named_captures }