Timeline


and

04/30/12:

19:40 Changeset in patch-queue [9:9c9a2760a63f] by Michael Granger <ged@…>
default
  • 1 edit
    1 add
    1 delete in /

Merged recent wordnet work into existing patch

04/16/12:

11:00 Changeset [159:677cc65003b4] by Michael Granger <ged@…>
default
  • 2 edits
    2 moves
    2 adds in /

Update build environment.

03/16/12:

05:52 Ticket #14 (The numwords method overwrites the original object) created by anand chhatpar

I'm using the rubygem for linguistics (1.0.9) on a Mac OS X snow leopard with ruby 1.9.2 If you do .en.numwords on a number with an ordinal, it returns the correct output but overwrites the original object. Here are the steps to reproduce the issue and the corresponding output:

$ irb ruby-1.9.2-p290 :001 > require 'linguistics'

=> true

ruby-1.9.2-p290 :002 > Linguistics::use(:en)

=> [String, Numeric, Array]

ruby-1.9.2-p290 :003 > a = "5"

=> "5"

ruby-1.9.2-p290 :004 > a.en.numwords

=> "five"

ruby-1.9.2-p290 :005 > a

=> "5"

ruby-1.9.2-p290 :006 > a = "5th"

=> "5th"

ruby-1.9.2-p290 :007 > a.en.numwords

=> "fifth"

ruby-1.9.2-p290 :008 > a

=> "5"

Expected the last line to say "5th" since the original variable 'a' should not have been modified. I've reproduced this same bug on a Windows 7 computer as well that is using the gem.

Note: See TracTimeline for information about the timeline view.