This issue was solved with changeset r39330.
Matthew, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
It's my understanding that a lot of people feel that way, might be worth deprecating because I'd be uncertain as to how many C extensions use this. I know ruby std-lib has it in curses, iconv, raddrinfo, stringio, tcltklib, and win32ole. The core has it in marshal, transcode, and error. I don't currently understand the functionality behind TypedData_Make_Struct and Data_Wrap_Struct so I'm not sure how these libraries would be affected.