Is it acceptable practice to patch Ruby's base classes, such as Fixnum?

后端 未结 4 1053
臣服心动
臣服心动 2020-12-31 03:47

I am still very new to Ruby (reading through the Pickaxe and spending most of my time in irb), and now that I know it\'s possible to patch classes in Ruby, I\'m

4条回答
  •  臣服心动
    2020-12-31 04:36

    Personally, I think it's acceptable to add methods to the base classes, but unacceptable to modify the implementation of existing methods.

提交回复
热议问题