Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
有丘直方
@UlyssesZhan
会员
第 34839 位会员 / 2018-04-13

[email protected]
0 篇帖子 / 5 条回帖
0 关注者
0 正在关注
0 收藏
GitHub Public Repos
  • SunProxy 10

    Android app to set up packet redirect rules (proxy) by VPN

  • peroutine 5

    Fuck the fact that the number of days in a week is prime

  • DisplayToggle 5

    Android app to toggle on and off the physical display

  • UlyssesZh.github.io 4

    Ulysses Zhan's blog!

  • monomal 1

    My osu! skin

  • WindowPet 0

    Pet overlay app built with tauri and react that lets you have adorable companion such as pets, an...

  • nixpkgs 0

    Nix Packages collection & NixOS

  • keysync 0

    Play games using mouse and keyboard on Android device

  • Everest 0

    Everest - Celeste Mod Loader / Mod API

  • Obtainium 0

    Get Android app updates straight from the source.

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 方法中有块,块中有 break 和 next,这种情况应该怎么理解? at 2018年04月14日

    在 block 中用 return 确实会报错,但是 break 也不可以简单地认为结束方法的执行,如果我们在方法内部循环之后再加一行代码的话,新加的代码也会被执行

  • 关于 alias_method 的作用范围问题 at 2018年04月13日

    alias_method 这种很核心的方法 rails 应该不会去污染的,而且据标准库文档 alias_method 是给已定义好的方法取别名,想必父类中已经定义过同名方法了吧?

  • define_singleton_method 时调用自身原来方法 at 2018年04月13日

    对于问题 1,1 楼已经回答 对于问题 2,其实 Ruby 中类的继承关系是非常简单的,通常情况(也就是没有 super 之类的情况)下,子类相当于把你定义的父类的东西和你定义的子类的东西前后拼接在一起。我们知道两次定义同一个方法,后一次会覆盖前一次,所以子类是无法追溯到父类的父类的同名方法的

  • Rails 最大的罪就是对程序员太好,让程序员太舒服 at 2018年04月13日

    Ruby 是我遇到过的最美丽的程序语言

  • 方法中有块,块中有 break 和 next,这种情况应该怎么理解? at 2018年04月13日

    不对,break 是结束循环,return 才是结束方法。 “break 1”的意思就是,结束循环,并且这个循环的返回值为 1 “return 1”的意思就是,结束方法,并且这个方法的返回值为 1

关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English