CライブラリーのRubyラッパー作ってると、.allocateしただけのオブジェクトのメソッドを呼ぶとSEGVするように作ってしまうな。でも全メソッドに対してNULLチェック書くのも現実的じゃないし、インスタンスを取得するマクロでも定義してその中でNULLチェックするのがセオリーなのかしら。

0

If you have a fediverse account, you can quote this note from your own instance. Search https://bookwor.ms/users/KitaitiMakoto/statuses/115535408339866211 on your instance and quote it. (Note that quoting is not supported in Mastodon.)