We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 621953b commit cbae591Copy full SHA for cbae591
spec/ruby/core/regexp/new_spec.rb
@@ -16,3 +16,15 @@
16
it_behaves_like :regexp_new_regexp_ascii, :new
17
it_behaves_like :regexp_new_regexp_ascii_8bit, :new
18
end
19
+
20
+describe "Regexp.new given a Fixnum" do
21
+ it "raises a TypeError" do
22
+ lambda { Regexp.new(1) }.should raise_error(TypeError)
23
+ end
24
+end
25
26
+describe "Regexp.new given a Float" do
27
28
+ lambda { Regexp.new(1.0) }.should raise_error(TypeError)
29
30
0 commit comments