should have protected the return value from GC, even when the method is defined in Ruby; close #1263