Skip to content
This repository
Browse code

The fix of #6479 is backported into 1.9.3 at r35917.

  • Loading branch information...
commit 79484fbb65f9d1d225825aab85507b2ae0832caa 1 parent c2b8945
NARUSE, Yui authored June 06, 2012

Showing 1 changed file with 14 additions and 31 deletions. Show diff stats Hide diff stats

  1. 45  library/ipaddr/new_spec.rb
45  library/ipaddr/new_spec.rb
@@ -70,43 +70,26 @@
70 70
     a.family.should == Socket::AF_INET
71 71
   end
72 72
 
73  
-  ruby_version_is ""..."2.0" do
74  
-    it "raises on incorrect IPAddr strings" do
75  
-      [
76  
-        ["fe80::1%fxp0"],
77  
-        ["::1/255.255.255.0"],
78  
-        ["::1:192.168.1.2/120"],
79  
-        [IPAddr.new("::1").to_i],
80  
-        ["::ffff:192.168.1.2/120", Socket::AF_INET],
81  
-        ["[192.168.1.2]/120"],
82  
-      ].each { |args|
83  
-        lambda{
84  
-          IPAddr.new(*args)
85  
-        }.should raise_error(ArgumentError)
86  
-      }
87  
-    end
88  
-  end
89  
-
90  
-  ruby_version_is "2.0" do
  73
+  ruby_bug "#6479", "1.9.3.235" do
91 74
     it "initializes IPAddr ipv4 mapped address with subnet mask" do
92 75
       a = IPAddr.new("::1:192.168.1.2/120")
93 76
       a.to_s.should == "::1:c0a8:100"
94 77
       a.to_string.should == "0000:0000:0000:0000:0000:0001:c0a8:0100"
95 78
       a.family.should == Socket::AF_INET6
96 79
     end
  80
+  end
97 81
 
98  
-    it "raises on incorrect IPAddr strings" do
99  
-      [
100  
-        ["fe80::1%fxp0"],
101  
-        ["::1/255.255.255.0"],
102  
-        [IPAddr.new("::1").to_i],
103  
-        ["::ffff:192.168.1.2/120", Socket::AF_INET],
104  
-        ["[192.168.1.2]/120"],
105  
-      ].each { |args|
106  
-        lambda{
107  
-          IPAddr.new(*args)
108  
-        }.should raise_error(ArgumentError)
109  
-      }
110  
-    end
  82
+  it "raises on incorrect IPAddr strings" do
  83
+    [
  84
+      ["fe80::1%fxp0"],
  85
+      ["::1/255.255.255.0"],
  86
+      [IPAddr.new("::1").to_i],
  87
+      ["::ffff:192.168.1.2/120", Socket::AF_INET],
  88
+      ["[192.168.1.2]/120"],
  89
+    ].each { |args|
  90
+      lambda{
  91
+        IPAddr.new(*args)
  92
+      }.should raise_error(ArgumentError)
  93
+    }
111 94
   end
112 95
 end

0 notes on commit 79484fb

Please sign in to comment.
Something went wrong with that request. Please try again.