IO.for_fd seems to work with $stdin.fileno, but it seems to not work for
others; specifically fd’s returned from inotify_init(2).
In the case of jruby 1.5.6, it tosses an exception (see link below). In
case of 1.6.0.RC2 it actually wraps the wrong fd. IO.for_fd(5).fileno ==
crazy, and wrong
Code and output here: https://gist.github.com/856207
(I would’ve filed this as a bug, but I can’t find the “sign up” link for
jira instance jruby uses just now)