Repository navigation
Bind net-pop into rbgo: require "net/pop" (Net::POP3 / Net::POPMail) - #200
Closed
tannevaled wants to merge 1 commit into
Closed
tannevaled wants to merge 1 commit into
tannevaled wants to merge 1 commit into
Conversation
Wire the pure-Go POP3 protocol codec github.com/go-ruby-net-pop/net-pop
into the VM so `require "net/pop"` works with no .rb file, mirroring the
redis/pg injected-socket-seam bindings.
Surface:
- Net::POP3.new(address, port = 110, apop = false, connection: io) and the
Net::POP3.start(...) { |pop| } convenience.
- Session: #start (USER/PASS or APOP) / #finish (QUIT) / #mails (LIST) /
#each_mail / #each / #delete_all / #n_mails / #n_bytes (STAT) / #reset
(RSET) / #set_all_uids (UIDL) / #noop / #stls, plus #address / #port /
#apop? / #started? / #active? / #_connection.
- Net::POPMail: #number / #length / #size / #unique_id / #uidl (UIDL n) /
#pop / #mail / #to_s (RETR, dot-unstuffed) / #header / #top (TOP) /
#delete / #delete! (DELE) / #deleted?.
- Net::POPError / Net::POPBadResponse (< POPError) / Net::POPAuthenticationError.
The socket is the host seam: rbgo drives the library's Transport over an
injected Ruby IO-like object (#write / #gets), so tests run against an
in-process transport with no real network and no leaked goroutines; Ruby
callbacks run inline under the GVL. CGO=0, builds on all six 64-bit arches.
registerNetPOP() runs after registerNetHTTP (Net module) and
registerSocket/registerOpenSSL; "net/pop" is added to providedFeatures and
POP3Obj/POPMailObj to classOf. New files kept at 100% statement coverage
via net_pop_internal_test.go over a deterministic FakePOP transport.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
Superseded by the net-wave consolidation PR (single merge onto main; shared builtins/require/object_model). Work preserved verbatim; branch kept. |
tannevaled
added a commit
that referenced
this pull request
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wire the pure-Go POP3 protocol codec
go-ruby-net-pop/net-popinto the VM sorequire "net/pop"works with no.rbfile, mirroring the redis/pg injected-socket-seam bindings.Surface
Net::POP3.new(address, port = 110, apop = false, connection: io)and theNet::POP3.start(...) { |pop| }convenience.#start(USER/PASS or APOP) /#finish(QUIT) /#mails(LIST) /#each_mail/#each/#delete_all/#n_mails/#n_bytes(STAT) /#reset(RSET) /#set_all_uids(UIDL) /#noop/#stls, plus#address/#port/#apop?/#started?/#active?/#_connection.Net::POPMail:#number/#length/#size/#unique_id/#uidl(UIDL n) /#pop/#mail/#to_s(RETR, dot-unstuffed) /#header/#top(TOP) /#delete/#delete!(DELE) /#deleted?.Net::POPError/Net::POPBadResponse(< POPError) /Net::POPAuthenticationError.Seam
The socket is the host seam: rbgo drives the library
Transport(Writeline/Readline/ReadRawLine) over an injected Ruby IO-like object (#write/#gets). Tests run against an in-processFakePOPtransport — no real network, no leaked goroutines; Ruby callbacks run inline under the GVL.Wiring
registerNetPOP()runs afterregisterNetHTTP(creates theNetmodule) and afterregisterSocket/registerOpenSSL;"net/pop"added toprovidedFeatures;POP3Obj/POPMailObjadded toclassOf.Verification
go build ./internal/vm/= 0; full repogo build ./...= 0;go vet ./internal/vm/= 0.net_pop.go,net_pop_bind.go) — all 30 functions.internal/vmsuite + whole-repogo test ./...green;-raceclean;gofmt -lclean.🤖 Generated with Claude Code