Permalink
Browse files

Fixed add_name to only add words, not methods like <=>

  • Loading branch information...
1 parent 67397ef commit e93421a12fda5bc9a05403f52e4240f8fd895431 @drbrain drbrain committed Apr 6, 2012
Showing with 7 additions and 1 deletion.
  1. +1 −1 lib/rdoc/generator/spellcheck.rb
  2. +6 −0 test/test_rdoc_generator_spellcheck.rb
@@ -114,7 +114,7 @@ def initialize options # :not-new:
# Aspell does not allow)
def add_name name
- name.split('_').each do |part|
+ name.scan(/[a-z]+/i) do |part|
@spell.add_to_session part
end
end
@@ -124,6 +124,12 @@ def test_initialize_add_words
ENV['ASPELL_CONF'] = orig_aspell_conf
end
+ def test_add_name
+ @sc.add_name '<=>'
+
+ assert true # just for counting
+ end
+
def test_find_misspelled
c = comment @text

0 comments on commit e93421a

Please sign in to comment.