socket?()
public
Returns true if stat is a socket, false if it isn’t or if the
operating system doesn’t support this feature.
File.stat("testfile").socket?
Show source
static VALUE
rb_stat_S(VALUE obj)
{
if (S_ISSOCK(get_stat(obj)->st_mode)) return Qtrue;
return Qfalse;
}