Versions
Every binding reports the version of itself, of the C library it wraps and of the Prism it parses Ruby with. A bug report is much easier to act on with this line in it.
ruby
Herb.version
# => "herb gem v0.11.0, libprism v1.9.0, libherb v0.11.0 (Ruby C native extension)"js
Herb.version
// => "@herb-tools/node@0.11.0, @herb-tools/core@0.11.0, libherb@0.11.0 (Node.js C++ native extension)"java
Herb.version();
// => "herb java v0.11.0, libprism v1.9.0, libherb v0.11.0 (Java JNI)"rust
herb::version();
// => "herb rust v0.11.0, libprism v1.9.0, libherb v0.11.0 (Rust FFI)"Java and Rust also report the two versions on their own, which is the form to compare against in code.
java
Herb.herbVersion(); // => "0.11.0"
Herb.prismVersion(); // => "1.9.0"rust
herb::herb_version(); // => "0.11.0"
herb::prism_version(); // => "1.9.0"The herb version command prints the same information for the gem and the library it loaded.
shell
bundle exec herb version