What is the purpose of `nil` private methods in ruby? : <p>Using ruby 2.3, and pry REPL, I have this funny result I cannot understand:</p>

<pre><code>nil.private_methods
# [:DelegateClass, :Digest, :sprintf, :format, :Integer, :Float, :String, :Array, :Hash, :throw, :iterator?, :block_given?, :catch, :loop, :Rational, :trace_var, :untrace_var, :Complex, :at_exit, :gem_original_require, :URI, :set_trace_func, :select, :caller, :caller_locations, :test, :fork, :`, :exit, :sleep, :respond_to_missing?, :load, :exec, :exit!, :syscall, :open, :printf, :print, :putc, :puts, :readline, :readlines, :p, :abort, :gets, :system, :spawn, :proc, :lambda, :srand, :pp, :rand, :initialize_copy, :initialize_clone, :initialize_dup, :Pathname, :trap, :gem, :BigDecimal, :require, :require_relative, :autoload, :autoload?, :binding, :local_variables, :warn, :raise, :fail, :global_variables, :__method__, :__callee__, :__dir__, :eval, :method_missing, :singleton_method_added, :singleton_method_removed, :singleton_method_undefined, :initialize]
</code></pre>

<p>It looks likes those private methods are linked to modules loaded:</p>

<pre><code>methods = nil.private_methods.dup
require "json"
nil.private_methods - methods
# [:j, :JSON, :jj]
</code></pre>

<p>I'm wondering about the purpose of those private methods and didn't find anything relevant on the internet.</p>
