Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix for numberic labels, tested. Fixes #59. #60

Merged
merged 2 commits into from

2 participants

@gkop

It was actually the to_s that was causing the problem, which irb calls when formatting the return value.

@glejeune glejeune merged commit efeb4dc into from
@gkop gkop deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 5, 2012
  1. @gkop
  2. @gkop

    Pass the build in Ruby 1.8

    gkop authored
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 1 deletion.
  1. +1 −1  lib/graphviz/types/lbl_string.rb
  2. +9 −0 test/test_graph.rb
View
2  lib/graphviz/types/lbl_string.rb
@@ -6,7 +6,7 @@ def check(data)
end
def output
- html = /^<([<|(^<)*<].*)>$/m.match(@data)
+ html = /^<([<|(^<)*<].*)>$/m.match(@data.to_s)
if html != nil
"<#{html[1]}>"
else
View
9 test/test_graph.rb
@@ -105,4 +105,13 @@ def test_search
assert_equal c1.find_node("a0"), a0
assert_nil c1.search_node("a0")
end
+
+ def test_to_s
+ assert_nothing_raised 'to_s with edge with numeric label failed.' do
+ a = @graph.add_nodes('a')
+ b = @graph.add_nodes('b')
+ @graph.add_edges(a, b, :label => 5)
+ @graph.to_s
+ end
+ end
end
Something went wrong with that request. Please try again.