2009-10-02 00:04:48 +08:00
|
|
|
class String
|
2013-10-01 02:47:53 +08:00
|
|
|
@@idx_reported = {}
|
|
|
|
def [](*args)
|
2017-01-18 04:09:27 +08:00
|
|
|
if args.length == 1 && args[0].class == ::Integer && !@@idx_reported[caller[0].to_s]
|
2013-10-01 02:47:53 +08:00
|
|
|
$stderr.puts "HOOK: String[idx] #{caller.join("\t")}\n\n"
|
|
|
|
@@idx_reported[caller[0].to_s] = true
|
|
|
|
end
|
|
|
|
slice(*args)
|
|
|
|
end
|
2009-10-02 00:04:48 +08:00
|
|
|
end
|