ttymode, ttymode_yield should be private #4275

olleolleolle opened this Issue Nov 10, 2016 · 1 comment


None yet

2 participants

olleolleolle commented Nov 10, 2016 edited

JRuby exposes more parts of File as public instance methods than MRI does.

These two are made public in JRuby:

  • ttymode
  • ttymode_yield

Assumptions in FakeFS about that makes its asserts not pass. Update: FakeFS v0.10.0 changed it assumptions.


  • jruby (2.3.1) 2016-11-09 0150a76 Java HotSpot(TM) 64-Bit Server VM 24.76-b04 on 1.7.0_76-b13 +jit [linux-x86_64]
  • Operating system: linux-x86_64 on Travis

Other relevant info you may wish to add:

Expected Behavior

File.instance_methods should exclude ttymode and ttymode_yield.

The test results in should not fail on ttymode_yield and ttymode

  • MRI has the above methods marked private (I think)
  • Here's a FakeFS test-case that checks File.instance_methods

Actual Behavior

@olleolleolle olleolleolle added a commit to olleolleolle/fakefs that referenced this issue Nov 10, 2016
@olleolleolle olleolleolle Spec: exclude a few public methods on File for JRuby 9026d6c
@kares kares added a commit that closed this issue Nov 11, 2016
@kares kares make ttymode and ttymode_yield helpers private
to have 'better' MRI compatibility (resolves #4275)
@kares kares closed this in 7274ccb Nov 11, 2016
@kares kares added this to the JRuby milestone Nov 11, 2016

Thank you, @kares!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment