This post originated from an RSS feed registered with Ruby Buzz
by Michael Granger.
Original Post: A Strange Way To Call Super
Feed Title: devEiate
Feed URL: http://deveiate.org/feed/rss/blog
Feed Description: A blog about Ruby, codecraft, testing, linguistics, and stuff. Mostly stuff.
Recently while trying to track down a memory problem in Redleaf, I ran across a curious bit of code in Ruby 1.9.1’s ‘uri’ library (in uri/common.rb specifically):
[code]
I can’t help but wonder if this isn’t a bit of defensive programming against monkeypatching or something. Is it done this way to avoid exposing a public #to_s?
It’s a mystery. Perhaps I’ll have to go track down the commit message for this change. Or if anyone knows, feel free to leave a comment.