clbustos / statsample

A suite for basic and advanced statistics on Ruby.
http://github.com/clbustos/statsample
BSD 3-Clause "New" or "Revised" License
402 stars 96 forks source link

Raising in equality precludes working with AwesomePrint #23

Closed justin808 closed 10 years ago

justin808 commented 10 years ago

Second comparison of this method in awesome_print/formatter.rb causes the crash.

Without this fix, pry + awesome_print cannot be used, as even a simple case such as

[1, 2, 3].to_scale

will crash

awesome_print/formatter.rb

Catch all method to format an arbitrary object.

#------------------------------------------------------------------------------
def awesome_self(object, type)
  if @options[:raw] && object.instance_variables.any?
    awesome_object(object)
  elsif object == ENV
    awesome_hash(object.to_hash)
  else
    colorize(object.inspect.to_s, type)
  end
end
justin808 commented 10 years ago

Any info on the status of this PR?

clbustos commented 10 years ago

Let me check this problem. I was busy with the fork of GLM method on statsample-glm, but now U can back to maintenance work.

justin808 commented 10 years ago

Thanks!

clbustos commented 10 years ago

You're welcome. Can you merge the changes on your rep and see what else could be imported on main branch?

justin808 commented 10 years ago

OK -- I'll do that right now, and then I'll rebase that into the other PR to make it smaller.

justin808 commented 10 years ago

actually rebase failed -- merging now, then I'll push