Skip to content

v0.2.3 — Address.new 0-arg allocator

Latest

Choose a tag to compare

@team-milestone-alfonso team-milestone-alfonso released this 19 Apr 10:50
· 1 commit to main since this release

Gem-only release per docs/V0_2_3_HANDOFF.md. No crate change — tsip-parser = \"0.2\" unchanged.

What changed

Previously TsipParser::Address.new raised TypeError: allocator undefined for TsipParser::Address because the magnus::wrap macro does not register a Ruby allocator. This release registers a 0-arg new singleton method that returns an empty Address (display_name: nil, uri: nil, params: {}), then the existing Ruby-side setters assemble it:

a = TsipParser::Address.new
a.display_name = \"Alice\"
a.uri          = TsipParser::Uri.parse(\"sip:alice@example.com\")
a.params[\"tag\"] = \"xyz\"
a.to_s  # => \"\\\"Alice\\\" <sip:alice@example.com>;tag=xyz\"

Unblocks the tsip-core bridge Address.build helper to drop its placeholder-parse workaround (parse(\"<sip:_@_>\")), which at 8k cps dialog throughput costs ~16k unnecessary parses/s.

Tests

41 runs / 72 assertions / 0 failures — 39 existing + 2 new.

Install

gem install tsip_parser

RubyGems: https://rubygems.org/gems/tsip_parser/versions/0.2.3