All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog
and this project adheres to Semantic Versioning
for the public APIs. rubysys
, even though shared publicly, is considered a private
API and may have breaking changes during a teeny version change.
- Support for trailing comma in method macros, thanks to @andrewtbiehl
- Github actions testing support, thanks to @danielpclark & @striezel
- Rust 2021 Edition, thanks to @goyox86
- Support for compiling on OpenBSD, thanks to @marvinthepa
- removed warnings for allow(unused_mut) and allow(unused_variables) on methods! rtself arg, thanks to @danlarkin
- internal ruby string length check, thanks to @mpalmer
- Implement
Eq
andHash
forSymbol
, thanks to @ahogappa0613
- not FFI-safe warnings when Rutie structs are used as return types, thanks to @ankane
- Implement
Integer::to_u32
andFixnum::to_u32
, thanks to @Hywan
- Docstring description for
to_enum
onArray
, thanks to @jhwiig methods!
macro now uses:ty
for return type instead of:ident
, thanks to @n8ta
- Implement
VM::call_super
->rb_call_super
, thanks to @askreet
- Allow commas after methods macros, thanks to @gemmaro
- Build for FreeBSD, thanks to @Stazer
- Issue when Rutie dependency included with relative path
- cargo feature
no-link
disables linking tolibruby
, thanks to @danlarkin - initial changes for Android support, thanks to @Riey
- Optimized equality methods, thanks to @asppsa
Hash::each
(viabinding::hash::each
) now callsrubysys::rb_hash_foreach
with a callback that properly returns ast_retval
instead of()
, thanks to @danlarkin- fixed build warnings due to trait objects, thanks to @danlarkin
- With dropping support for Ruby 2.4 we can now perfectly model the
force_encoding
method which checks if the object is frozen and raises the appropriate error.
VM::error_pop
to get the Ruby Exception and remove it from interfering with the current threadVM::exit
to exit the Ruby VM with status code givenVM::exit_bang
to exit skipping exit handlersNilClass
has hadCopy
andClone
derived on it- Readme section for Ruby's Future and SemVer
VM::abort
exit the Ruby VM via abortVM::trap
for signal handlingVM::at_exit
for executing Rust code after the Ruby VM stopsFloat::implicit_to_f
VM::protect
takes a function that now returns anAnyObject
instead of aValue
.VM::protect
will become more frequently used and encouraged which is why this change is necessary asValue
is meant to be internal.- Avoid showing
Value
or.value()
in any documentation. Prefer.into()
when necessary.Value
should always be treated as a private API.
Encoding::is_compatible
which is the same as Ruby'sEncoding.compatible?
- Updated
libc
andlazy_static
dependency versions.
- Restored use of
Path
for Windowsbuild.rs
which had been removed in 0.5.5
- Restored use of
Path
for Windowsbuild.rs
which had been removed in 0.5.5
- Methods that took type
Option<&[]>
now take only type&[]
, thanks to @dsander
- Safety policy in README
Fixnum.to_u64
, thanks to @irxgroundInteger.to_u64
, thanks to @irxgroundimpl From<u64> for Integer
, thanks to @irxgroundimpl Into<u64> for Integer
, thanks to @irxgroundimpl From<i32> for Integer
, thanks to @irxgroundimpl From<u32> for Integer
, thanks to @irxgroundimpl Into<u32> for Integer
, thanks to @irxgroundrubysys::fixnum::rb_uint2inum
, thanks to @irxgroundrubysys::fixnum::rb_ll2inum
, thanks to @irxgroundrubysys::fixnum::rb_ull2inum
, thanks to @irxgroundrubysys::fixnum::rb_num2short
, thanks to @irxgroundrubysys::fixnum::rb_num2ushort
, thanks to @irxgroundrubysys::fixnum::rb_num2uint
, thanks to @irxgroundrubysys::fixnum::rb_num2ulong
, thanks to @irxgroundrubysys::fixnum::rb_num2ll
, thanks to @irxgroundrubysys::fixnum::rb_num2ull
, thanks to @irxground
- Integer
is_correct_type
to permit Bignum, thanks to @irxground rubysys::fixnum::rb_num2int
returnslibc::c_long
rather thanc_int
, thanks to @irxground
- symlink check in
build.rs
which had rare systems in whichexists
didn't work on symlink, thanks to @ekump
GC::adjust_memory_usage
, thanks to @Anttiexamples/rutie_ruby_gvl_example
, thanks to @dsanderGC::count
GC::disable
GC::enable
GC::force_recycle
GC::mark_locations
GC::mark_maybe
GC::register
GC::start
GC::stat
GC::unregister
util::inmost_rb_object
which is a string recurse tool to get nested ruby objects
GC::mark
documentation notes.util::closure_to_ptr
from'static + FnOnce
toFnMut
, thanks to @dsanderThread::new
from'static + FnOnce
toFnMut
, thanks to @dsanderThread::call_without_gvl
from'static + FnOnce
toFnMut
, thanks to @dsanderThread::call_without_gvl2
from'static + FnOnce
toFnMut
, thanks to @dsanderThread::call_with_gvl
from'static + FnOnce
toFnMut
, thanks to @dsanderAnyException::new
to work with nested exception classes
util::is_proc
&util::is_method
rb_enc_compatible
useful for internal string encoding compatibility checks from which we now havebinding::is_compatible_encoding
andbinding::compatible_encoding
RString.compatible_with
as the public API forrb_enc_compatible
with traitEncodingSupport
RString::compatible_encoding
as the public API forrb_enc_compatible
with traitEncodingSupport
impl Deref for AnyException
impl Deref for AnyObject
impl Borrow<Value> for AnyObject
impl Borrow<Value> for AnyException
impl AsRef<Value> for AnyObject
impl AsRef<Value> for AnyException
impl AsRef<AnyObject> for AnyObject
impl AsRef<AnyException> for AnyException
impl<T: Object> From<&T> for AnyObject
- Removed Ruby 2.3 support & added 2.6
VM::raise_ex
now acceptsInto<AnyException>
rather than justAnyException
- Refactor internal encoding types
- Refactor
build.rs
script to use Ruby provided cflags
- pkg-config-rs removed from Rutie and from the build process
impl Into<i32> for Integer
thanks to @AnttiInteger.to_i32
, thanks to @AnttiFixname.to_i32
, thanks to @Antti
Integer.to_i64
to userb_num2long
for genuinei64
result, thanks to @Anttiimpl Into<i64> for Integer
to userb_num2long
for genuinei64
result, thanks to @AnttiFixname.to_i64
to userb_num2long
for genuinei64
result, thanks to @Antti
- Windows build support (partially working)
- Mac static build support, thanks to @felix-d
- Rutie pronunciation guide
CodepointIterator
now borrows RString parameter instead of consuming ownership
RString.codepoints
uses a new internal implementation asrb_str_codepoints
isn't exported/available on some OSes
- Wrapping struct changed from Ruru to Rutie & some of the same changes in documentation, thanks to @turboladen
- Static build support
- Methods
VM::yield_object
andVM::yield_splat
Enumerator
objectArray.to_enum
TryConvert
forAnyException
VM::error_info
andVM::clear_error_info
- Documentation for
VM::protect
Binding
Into<Value>
for all types whichimpl Object
Into<AnyObject>
for all types whichimpl Object
From<i64>
andInto<i64>
forInteger
From<&'static str>
forRString
eval!()
macro withbinding, filename, linenum
for optional argumentsrubysys::rproc::check_arity
for simple numeric bounds checkingSymbol.to_proc
Proc.is_lambda
Object.protect_send
andObject.protect_public_send
have changed the first parameter from requiringString
to&str
VM::protect
returnsResult<AnyObject, i32>
rather thanResult<Value, i32>
PartialEq
is now implemented for Ruby objects via the==
method
- This
CHANGELOG.md
file - Method
RString.codepoints
CodepointIterator
which uses direct ruby calls to get character value from bytes as determeined by the strings ownEncoding
and produces them one at a timebinding::new_frozen
for internal use withCodepointIterator
rubysys::string::{rstring_embed_len, rstring_ptr, rstring_end}
to match equivalent Ruby C macros for use inCodepointIterator
rubysys::rb_str_len
renamed torubysys::rstring_len
to match the name of the Ruby C macro which it is a copy of
rubysys::string::{RStringAs, RStringHeap, RStringAux}
to match Ruby's C code implementation perfectly
- CI testing for Rust 1.25 as pointer addition wasn't stable until 1.26
- Full encoding support with
VM::init_loadpath
,RString.encode
,RString.is_valid_encoding
RString::from_bytes
which takes both a byte sequence for characters and anEncoding
object to interpret how to get those characters from bytes- Documentation about what to try if binary installs of Ruby panic on CI servers
rubysys::encoding::{coderange_set, coderange_clear}
and encoding flagsEncodingIndex
type for internal use in thebinding
layer
- Updated code examples to remove deprecated
RString::new
from them - TravisCI Linux builds now compile all Rubies
- CI server logging for the Rust build process
- Ruby gem
rutie
version 0.0.3 - Documentation for Ruby gem
rutie
- Build documentation with
build.md
- Customization options for using
pkg-config
- Example CLI eval program in examples directory, thanks to @irxground
RString::count_chars
, thanks to @irxground
- Refactor of
VM::protect
, thanks to @irxground - Internally use
RString::new_utf8
TryConvert
moved tosrc/class/traits/try_convert.rs
but still shared in root of crate- Refactor internal method names for
Value
insrc/rubysys/value.rs
to match Ruby source code
RString::new
— use eitherRString::new_utf8
orRString::new_usascii_unchecked
- Use of
fiddle
from examples and documentation
- CI testing for Rust 1.25 for purpose of older match ref syntax
cargo test
andcargo build
require the-vv
flag afterwards in older Rust versions- refactor
option_to_slice
for Rust 1.25 compatible syntax
TryConvert
implicit conversion orNilClass
resultEncoding
andEncodingSupport
TryConvert
forRString
- Majority of Ruby main constants in
src/rubysys/constant.rs
rubysys::class::{rb_define_singleton_method, rb_scan_args}
rubysys::string::{rb_check_string_type, rb_str_locktmp, rb_str_unlocktmp, is_lockedtmp}
is_frozen
check forValue
and several Ruby macros forValue
util::option_to_slice
- Refactor Pathname example in README
- Refactor away
util.rs
files frombinding
andrubysys
- Refactor away from using heap to stack memory, thanks to @irxground
- A few Ruby
ValueType
flags were incorrect inrubysys
String#concat
, thanks to @irxground- Method signatures for all of
rubysys
direct method mappings documented
Array.store
does not return anything- Misnamed
rubysys::string
methodrb_str_ascii_only_p
torb_enc_str_asciionly_p
- OSX testing on Travis CI
Cargo.toml
badges for Travis CI and maintenance status- Full README details
- Ruby & Rust examples
- Migrated
parse_arguments
fromVM
toutil
- Refactor build script
- Verbose CI output for Rust
- Set default
pkg-config
path for Ruby
pkg-config
support- Basic migrating from Ruru to Rutie notes
- TravisCI testing to not use feature flag
Display
andDebug
traits forAnyException
- Migrated from
Error
toAnyException
Object.protect_send
,Object.protect_public_send
,Object.try_convert_to
,VM::eval
method signatures changed to returnAnyException
onErr
- Macro DSL to have the error types as
AnyException
- Duplicate thread methods from
VM
result::Error