Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' of git://github.com/dasil003/attachment_fu

  • Loading branch information...
commit 88af79006b22b24efaab69c2ada0b8da36f9618d 2 parents 287472f + 9056517
risk danger olson authored
2  lib/geometry.rb
@@ -25,7 +25,7 @@ def initialize(width=nil, height=nil, x=nil, y=nil, flag=nil)
25 25
   end
26 26
 
27 27
   # Construct an object from a geometry string
28  
-  RE = /\A(\d*)(?:x(\d+))?([-+]\d+)?([-+]\d+)?([%!<>@]?)\Z/
  28
+  RE = /\A(\d*)(?:x(\d+)?)?([-+]\d+)?([-+]\d+)?([%!<>@]?)\Z/
29 29
 
30 30
   def self.from_s(str)
31 31
     raise(ArgumentError, "no geometry string specified") unless str
7  test/geometry_test.rb
@@ -23,6 +23,13 @@ def test_should_resize_no_height
23 23
       "100" => [100, 128]
24 24
   end
25 25
   
  26
+  def test_should_resize_no_height_with_x
  27
+    assert_geometry 50, 64,
  28
+      "50x"  => [50, 64],
  29
+      "60x"  => [60, 77],
  30
+      "100x" => [100, 128]
  31
+  end
  32
+  
26 33
   def test_should_resize_with_percent
27 34
     assert_geometry 50, 64,
28 35
       "50x50%"   => [25, 32],

0 notes on commit 88af790

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