Skip to content
This repository has been archived by the owner on Jan 3, 2020. It is now read-only.

Commit

Permalink
Move top-level uri autoload expressions to URI module scope
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed Jun 10, 2019
1 parent fc0488c commit 4eb4514
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mruby/src/extn/stdlib/uri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ pub fn init(interp: &Mrb) -> Result<(), MrbError> {
interp.def_rb_source_file("uri/common.rb", include_str!("uri/common.rb"))?;
interp.def_rb_source_file("uri/file.rb", include_str!("uri/file.rb"))?;
interp.def_rb_source_file("uri/ftp.rb", include_str!("uri/ftp.rb"))?;
interp.def_rb_source_file("uri/generic.rb", include_str!("uri/generic.rb"))?;
interp.def_rb_source_file(
"uri/generic.rb",
include_str!("uri/generic.rb")
.replace(r"/[@:\/]/o", r"/[@:\/]/")
.replace(
"autoload :IPSocket, 'socket'\nautoload :IPAddr, 'ipaddr'",
"module URI\n autoload :IPSocket, 'socket'\n autoload :IPAddr, 'ipaddr'\nend",
),
)?;
interp.def_rb_source_file("uri/http.rb", include_str!("uri/http.rb"))?;
interp.def_rb_source_file("uri/https.rb", include_str!("uri/https.rb"))?;
interp.def_rb_source_file("uri/ldap.rb", include_str!("uri/ldap.rb"))?;
Expand Down

0 comments on commit 4eb4514

Please sign in to comment.