IronRuby 使用 WebClient 下载文件“没有足够的存储空间来处理此命令”
在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
http://ironruby.codeplex.com/workitem/5814(IR 中的错误)
http://ironruby.codeplex.com/workitem/5814 (bug in IR)