Navigation Menu

Skip to content

Commit

Permalink
make ttymode and ttymode_yield helpers private
Browse files Browse the repository at this point in the history
to have 'better' MRI compatibility (resolves #4275)
  • Loading branch information
kares committed Nov 10, 2016
1 parent a4911d0 commit 7274ccb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ruby/stdlib/io/console.rb
Expand Up @@ -75,6 +75,7 @@ def ttymode
end
termios
end
private :ttymode

def ttymode_yield(block, &setup)
begin
Expand All @@ -86,6 +87,7 @@ def ttymode_yield(block, &setup)
end
end
end
private :ttymode_yield

TTY_RAW = Proc.new do |t|
LibC.cfmakeraw(t)
Expand Down Expand Up @@ -269,7 +271,7 @@ def oflush
def ioflush
end
end
elsif !IO.method_defined?:ttymode
elsif !IO.private_method_defined? :ttymode
warn "io/console on JRuby shells out to stty for most operations"

# Non-Windows assumes stty command is available
Expand Down

0 comments on commit 7274ccb

Please sign in to comment.