Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
yes_or_no
@yes_or_no
Member
NO. 14255 / 2014-07-28

[email protected]
0 Topics / 2 Replies
0 Followers
0 Following
1 Favorites
No GitHub.
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 有关 inject 的一点点`新` 体会. at November 09, 2016

    #4 楼 @josh_sulin @前面,少了一个等号

    result@rentals.inject(0) {|sum, rental| sum + rental.charge}
    替换成result=@rentals.inject(0) {|sum, rental| sum + rental.charge}
    
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English