Skip to content

Commit

Permalink
Cast threshold to string in gsub
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielius committed Nov 23, 2015
1 parent b8b315a commit 823dd5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/decisiontree/id3_tree.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def build_tree(tree = @tree)
end
label_text = "#{key} ''"
if type(attr[0].attribute) == :continuous
label_text.gsub!("''", attr[0].threshold)
label_text.gsub!("''", attr[0].threshold.to_s)
end

[parent_text, child_text, label_text]
Expand Down

0 comments on commit 823dd5e

Please sign in to comment.