rbs icon indicating copy to clipboard operation
rbs copied to clipboard

Updated most of Kernel module methods

Open sampersand opened this issue 1 year ago • 0 comments

This PR updates most of Kernel's module methods. Here's some things to note:

  1. Only Complex, Rational, open, rand, select, exec, spawn, and system remain. These methods will be addressed in later PRs, but are somewhat complicated, and I wanted to get this PR merged.
  2. There is one TODO that's still outstanding that will be completed by the time I finish the other Kernelmethods: The new assert_send_raises doesn't actually validate the signature it's passed (instead, it only validates the raised error).
  3. The def self?.XXX syntax is used to indicate module_functions. However, it doesn't mark the instance methods as private (it should be equal to def self.XXX and private def XXX).
  4. An issue I ran into while doing this is that loop with no arguments returns an Enumerator, except the each method doesn't actually pass in any arguments (ie loop.each{|*x,**y,&z| break [x, y, z] } gives you [[], {}, nil). This means the Enumerator[nil, untyped] interface is technically incorrect, as that implies it is given an argument. I've omitted the test, but I'm not sure what to do about it.

sampersand avatar Aug 13 '24 01:08 sampersand