Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems. Learn more →
Top 5 Ruby C Projects
-
> * A pointer to a unique class for that instance, called the “singleton class” of the object, also used for method lookup
I don't think this is accurate. The source code shows a generic `RObject` [0] contains flags, a pointer to a class (named `klass`), and instance variables. An `RClass` [1] contains flags, `klass`, `super` and a table of methods.
In both cases there is only a single pointer to a class that's used for method lookup.
> Ruby will look in the singleton class for the specific user instance first, and will only look for an instance method of the class if there is no matching method in the singleton class.
This is true, but it implies that Ruby does two separate lookups. The actual solution is more elegant.
An object's `klass` points to its singleton class, and method lookup happens only on that class and its superclasses. The second lookup implied above actually happens implicitly because the class of the object is an ancestor of the singleton class.
Specifically, for `class C`, its `klass` points to `<< C`, whose ancestors are `<< Object`, `<< BasicObject`, `Class`, `Module`, `Object` and `BasicObject`.
Ruby's whole object model, and the way it sets up this inheritance chain, is IMO beautiful and underappreciated.
> I’m not really sure why the Smalltalk solution wasn’t used
I think the way Ruby actually works is closer to the Smalltalk approach than the author realizes.
[0] https://github.com/ruby/ruby/blob/71f402c5d50919b0329d04704d...
[1] https://github.com/ruby/ruby/blob/71f402c5d50919b0329d04704d...
-
Judoscale
Save 47% on cloud hosting with autoscaling that just works. Judoscale integrates with Rails, Sidekiq, Solid Queue, and more to make autoscaling easy and reliable. Save big, and say goodbye to request timeouts and backed-up job queues.
-
-
Project mention: Ceedling v1.0 released – Ruby-based unit testing and build system for C projects | news.ycombinator.com | 2025-01-06
-
-
InfluxDB
InfluxDB high-performance time series database. Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
Ruby C discussion
Ruby C related posts
-
IPv6 Is Hard
-
Better Know a Ruby Thing: Singleton Classes
-
Ceedling v1.0 released – Ruby-based unit testing and build system for C projects
-
Ruby 3.4.1
-
News for Ruby 3.4.0
-
Float Self-Tagging
-
It's Time to Replace TCP in the Datacenter
-
A note from our sponsor - InfluxDB
influxdata.com | 25 Apr 2025
Index
What are some of the best open-source C projects in Ruby? This list will help you:
# | Project | Stars |
---|---|---|
1 | ruby | 22,551 |
2 | ruby2d | 658 |
3 | Ceedling | 657 |
4 | psych | 571 |
5 | embedded-car | 0 |