IronRuby 使用 WebClient 下载文件“没有足够的存储空间来处理此命令”

发布于 2024-09-10 13:10:01 字数 819 浏览 4 评论 0原文

在 IronRuby 交互式控制台的交互式窗口中输入以下两行。

wc = System::Net::WebClient.new
doc = wc.DownloadString("http://yahoo.com")

我收到以下错误。

=> mscorlib:0:in `WinIOError': Not enough storage is available to process this command.\r\n (IOError)
    from mscorlib:0:in `Write'
    from (ir):1

编辑:看起来它通常与字符串相关。以下产生相同的错误
x =“字符串”* 40000

编辑: 看起来我的问题与交互式控制台有关。
http://rubyforge.org/ tracker/index.php?func=detail&aid=23485&group_id=4359&atid=16798

如果我使用它

wc = System::Net::WebClient.new
doc = wc.DownloadString("http://yahoo.com"); nil

它可以工作...

Entering the following two lines into an interactive window in IronRuby interactive console.

wc = System::Net::WebClient.new
doc = wc.DownloadString("http://yahoo.com")

I get the following error.

=> mscorlib:0:in `WinIOError': Not enough storage is available to process this command.\r\n (IOError)
    from mscorlib:0:in `Write'
    from (ir):1

Edit: looks like it's related to strings in general. The following produces the same error
x = "String" * 40000

Edit:
looks like my problems are related to interactive console.
http://rubyforge.org/tracker/index.php?func=detail&aid=23485&group_id=4359&atid=16798

if I use this

wc = System::Net::WebClient.new
doc = wc.DownloadString("http://yahoo.com"); nil

it works...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文