Issue #1 open

Monkeypatch Mode Throws NoMethodErrors

Michael Granger
repo owner created an issue

(Reported by Karsten Fluegge <info at pannous.com>)

When Linguistics is used in "monkeypatch" mode (e.g., Linguistics.use( :en, monkeypatch: true )), several methods throw NoMethodErrors:

"ten".ordinal
NoMethodError: undefined method `log' for "ten":String

Comments (5)

  1. Michael Granger reporter

    This is happening because many of the mixed-in methods assume that the receiver will be the inflector, which extends Loggability, which obviously isn't true in the case of monkeypatch mode.

    I'll either need to include Loggability in the monkeypatch, or (more likely) rewrite or remove logging statements to explicitly use the Linguistics logger.

  2. Michael Granger reporter

    This still doesn't find all the places where this is true in monkeypatch mode, but given that I need to rework the inflector for Ruby 2 anyway (#5), I'll likely be modifying the code in question anyway.

  3. Log in to comment