lib/rio/iomode.rb in rio-0.5.1 vs lib/rio/iomode.rb in rio-0.6.0

- old
+ new

@@ -1,8 +1,8 @@ #-- # =========================================================================== -# Copyright (c) 2005-2012 Christopher Kleckner +# Copyright (c) 2005-2017 Christopher Kleckner # All rights reserved # # This file is part of the Rio library for ruby. # # Rio is free software; you can redistribute it and/or modify @@ -58,11 +58,11 @@ primarily_read? or allows_both? end def allows_write?() primarily_write? or allows_both? end - extend Forwardable - def_instance_delegators(:@mode,:=~,:==,:===) + extend RIO::Fwd + fwd_readers :@mode,:=~,:==,:=== end end module Mode module StrMethods def primarily_read?() @mode[0,1] == 'r' end