Hi,
I am building a gem and I am not sure how to handle dependencies
versions.
The gem I need is ActiveSupport and I want my gem to be compatible with
version 2.3.x and 3.x.x
In my code I need the classify method from the inflector module. But
they don''t work the same way in version 2.3.x ans in version 3.x
This code works when I am using the version 2.3.x but fails with version
3.x.x
>> board = :ruby_forum
>> klass = board.respond_to?(:classify) ? board.classify :
ActiveSupport::Inflector::classify(board)>> NoMethodError: undefined method `classify'' for
ActiveSupport::Inflector:Module
This line doesn''t work in version 3 because it evaluates the last
condition, and the classify method doesn''t exist in version 3.
What trick could I use?
Greg
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.