[ANN] Threequals: Ruby-like #=== for VW

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ANN] Threequals: Ruby-like #=== for VW

Randy Coulman

All,

I have just released Threequals, which implements a Ruby-like #=== operator for Visualworks Smalltalk.

#=== provides more flexible object comparison, which can be useful in certain circumstances. For example, I now use #=== to compare expected and actual arguments in my DoubleAgents test double library.

In this implementation, two objects are === if they are =. In addition:

  • A BlockClosure is === to an object if the block evaluates to true when passed that object.

  • A Class is === to an object if the object is an instance of the class or one of its subclasses.

  • An Interval is === to a number if that number is within the endpoints of the interval, including the endpoints.

  • If the optional Threequals-Regex package is loaded, a regular expression (RxMatcher) is === to a string if the string matches the regex.

Threequals is available in the Cincom Public Store Repository. A snapshot of the current version is also on
GitHub. The Readme file on GitHub includes high-level documentation if you'd like more information before diving in.

The full release announcement is on my blog, Courageous Software.

Thanks,
Randy
--
Randy Coulman
Email: [hidden email]
Home: http://randycoulman.com
Twitter: @randycoulman      GitHub: randycoulman

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc