428438-428692 subjects 428910-429137
Help request: failing to create an instance of a class within a spec
428667 [sjouke.fikse] a test project, I'm trying to create an instance of a class in a spec file,
+ 428669 [ryand-ruby@z] Within a test project, I'm trying to create an instance of a class in a =
| 428681 [sjouke.fikse] Oh, I'm sorry, I did post this in the Ruby on Rails forum as well. I
+ 428670 [stefano.croc] I think the issue is that you need to tell require where 'street.rb' really is.
428682 [sjouke.fikse] Strangely, everything works, I don't know why. I didn't even need to use
[ANN] nokogiri 188.8.131.52 Released
428668 [mike.dalessi] nokogiri version 184.108.40.206 has been released!
Design by contract
428671 [adamwenham64] I'm been reading The Pragmatic Programmer and have come across the concept
+ 428672 [ryand-ruby@z] concept of 'Design by Contract' =
| + 428674 [dromveg@gm i] ...
| + 428675 [adamwenham64] Thanks Ryan. So it seems old, and not particularly widespread these days.
| 428676 [adamwenham64] Thanks Daniel. Same questions to you :)
| 428677 [peterhickman] I think that D also has something like DBC as part of the language.
+ 428678 [kf7qga@gm il] It is good to learn Design By Contract (DBC). Thinking about
428679 [brianknapp@g] I got into Design By Contract with Obvious (http://obvious.retromocha.com)
+ 428680 [kf7qga@gm il] I think that's true. Another way to look at it is that you've moved
| 428683 [adamwenham64] Thanks all, I was on the fence but I think I'll check out DBC after all.
+ 428721 [shortcutter@] Adding DBC to Ruby is quite a fundamental change. I'd say, if you feel
Looking for a MySQL visualization tool that draws relationships based on tablename_id convention
428684 [bert.mcguirk] Has anyone seen a tool that generates ERR diagrams and relationship =
428686 [ryand-ruby@z] On Jul 22, 2014, at 16:43, Bert Gregory Mcguirk <firstname.lastname@example.org> =
428693 [alex@st nk .] Me too, e.g.: http://pivotallabs.com/dot-rake/ -- passed on more for
428694 [ryand-ruby@z] Damn. You should look at the graph gem. It is a LOT friendlier than that =
428695 [alex@st nk .] OH yes. You did notice the date on that blog post, right? :-) I think
428696 [abinoam@gm i] and
428697 [bert.mcguirk] ...
better complex precision
428698 [uzleepito@gm] Complex numbers use floating point numbers by default. Is there a
428699 [jjconti@gm i] => ((1/3)+0i
428700 [mike@st k. a] ...
428701 [uzleepito@gm] Yes, this is true. But it's easy to loose this nice behaviour.
428710 [shortcutter@] One option would be to create your own class for complex numbers.
chris pine's "learn to program" get a shout-out in "unshelved"
428703 [martindemell] Nice to see :)
Ruby 2.1 regexes equivalent to Perl 5.18?
428704 [gvimrc@gm il] Are Ruby regexes in 2.1 equivalent in power to those in Perl 5.18?
428705 [stu@ru yp og] Did you run a diff and benchmark them? Sort of strange one line question. I
428706 [gvimrc@gm il] I was thinking more in terms of features rather than performance. Last I
428709 [shortcutter@] That cannot be. There is at least one feature in Perl Regex which
confusion between precedence of unary minus and puts method
428707 [aruprakshit@] ...
+ 428708 [matthew@ke w] puts -5
+ 428720 [shortcutter@] Because the parser needs a way to make a decision about ambiguous
rib and .irbrc files
428711 [ktam@yv .e .] Up till now I've just had a single .irbrc file in one directory =
428713 [shortcutter@] Yes, that would be the proper solution IMHO. I checked a shell
428712 [wbrisett@at ] This is way out of my league, but knowing some of the folks here, they might have a solution and the prizes aren't so bad either. ;)
428714 [saku@yt i. i] Looks like my solution is the first passing solution which
428715 [jjconti@gm i] It says change non_empty? and your change is outside the method.
428716 [saku@yt i. i] Irrelevant, you can define method anywhere, but fixed.
[ANN] marketo-api-ruby 0.9.2 Released
428717 [austin@cl ar] marketo-api-ruby version 0.9.2 has been released!
[ANN] when_exe 0.3.7 Released
428718 [suchowan@bo ] when_exe version 0.3.7 has been released.
[ANN] test-unit 3.0.0
428719 [kou@co mi ng] test-unit 3.0.0 has been released!
[ANN] rake-compiler 0.9.3 Released
428722 [luislavena@g] rake-compiler version 0.9.3 has been released!
Newbie's need for help
428723 [marc.chanlia] I'm learning to write Ruby using classes (as opposed to scripts).
+ 428724 [brettskiii@g] result = Input1.new( 10, 20 ).sum.to_s
| + 428725 [marc.chanlia] Thanks for the answer but that's not what I want to do. I want to use a
| | 428785 [jamgof08@gm ] common mistake I used to make always instationate a class and dont forget
| | 428791 [marc.chanlia] Thanks. I'm practicing all the good advice I've had on this list.
| + 428726 [phillipboone] Marc,
| + 428727 [brettskiii@g] you don't pass new as a parameter, the following code works
| | 428731 [marc.chanlia] ...
| + 428729 [marc.chanlia] ...
| 428730 [matthew@ke w] Actually, there is user interaction -- it calls `gets` twice. It just
| 428733 [marc.chanlia] ...
+ 428728 [kubasub12@gm] There way to do it has been answered. The two main problems that I see here
428732 [marc.chanlia] ...
428734 [shortcutter@] In this example it may not make a difference but I would do the
428735 [marc.chanlia] Thanks, Robert. I like the idea. It makes the class more general and the
428736 [alex@st nk .] Have fun learning Ruby! Your question was answered but I hope this
428737 [marc.chanlia] Thanks, Alex.=20
Undocumented behaviour of Array#join
428738 [aruprakshit@] ...
+ 428739 [jjconti@gm i] Wow
| 428740 [mosny@zy .l ] ...
| 428741 [matthew@ke w] This has been standard behaviour since at least 1.8.7
+ 428742 [tamouse.list] As #join returns a String, I'm sort of wondering what else you were
428743 [jjconti@gm i] I think he expected a failure.
428744 [matthew@ke w] class Array
428751 [shortcutter@] Or, probably a tad more efficient
[ANN] Tork 19.10.0 - test with fork
428753 [sunaku@gm il] 1. Absorbs test execution overhead into a master process.
[ANN] rubygems-sandbox 1.3.0 Released
428754 [ryand-ruby@z] rubygems-sandbox version 1.3.0 has been released!
[ANN] imap_processor 1.5 Released
428755 [drbrain@se m] imap_processor version 1.5 has been released!
428757 [ryand-ruby@z] Oops. This was actually released by me. Hoe spoofed the email from by =
428759 [andrew@av t.] RubyForge is gone! I guess this link needs to be updated... (Also linked
428761 [ryand-ruby@z] linked from the gemspec, seen at: =
[ANN] oedipus_lex 2.3.2 Released
428756 [ryand-ruby@z] oedipus_lex version 2.3.2 has been released!
[ANN] hoe-seattlerb 1.3.3 Released
428781 [ryand-ruby@z] hoe-seattlerb version 1.3.3 has been released!
[ANN] rubygems-cleanroom 1.0.0 Released
428782 [ryand-ruby@z] rubygems-cleanroom version 1.0.0 has been released!
428787 [dsisnero@gm ] ...
428792 [masaki.suket] I'm not sure it works or not, but try WIN32OLE_VARIANT object instead of nil.
428810 [dsisnero@gm ] Masaki Suketa,
428826 [masaki.suket] Have you tried WIN32OLE_VARIANT.new(nil, WIN32OLE::VARIANT::VT_ERROR)
428827 [dsisnero@gm ] Yes, I tried that. It sets the obj to a WIN32OLE_VARIANT of type 10 with
428828 [masaki.suket] Can you call CreateLineElement2 method from VBScript(not VB.NET)?
building ext/tk on Ubuntu 14.04
428789 [joelvanderwe] In case anyone else is struggling with getting the Tk extension to work
428790 [nagai@ai ky ] Would you try to give proper options for tcltklib decribed in
+ 428793 [brandon.eric] =0A=
+ 428796 [joelvanderwe] cd ext/tk && make distclean &&
428799 [brandon.eric] =0A=
429259 [prusswan@gm ] sudo ln -s /usr/lib/x86_64-linux-gnu/libtcl8.5.so.0 /usr/lib/libtcl8.5.so.0
[ANN] sexp_processor 4.4.4 Released
428800 [ryand-ruby@z] sexp_processor version 4.4.4 has been released!
428801 [brandon.eric] Very good tdk-uiop.=0A=
428802 [ryand-ruby@z] On Aug 14, 2014, at 20:12, Brandon Ericsson =
428809 [brandon.eric] If another form of expression is less expressive one could describe the nat=
Ruby and monotonic time
428803 [saku@yt i. i] Is it unheard of that class singleton method does not return class in core?
+ 428804 [bascule@gm i] Tony Arcieri
| 428805 [saku@yt i. i] But should this require external library? Or is monotonic time
+ 428806 [normalperson] Yes, we have Process.clock_gettime in Ruby 2.1+
428807 [saku@yt i. i] Thanks it does work in OSX, just tried. But really it's not very
428808 [brandon.eric] Use Codemonkey. Tdk is 3rd BIOS with the OSXT.=0A=
[ANN] Rack, Change of Maintainer & Status
428811 [jftucker@gm ] Dearest Rack Community, Ruby Community, and passionate onlookers,
+ 428814 [ e@80 24 or ] James, Chris: thank you for all the leadership and work over the years!
+ 428816 [groups@in ox] Thanks for all the hard work!
Unexpected output with the Curses.getch function call
428812 [nikita.troph] Greetings!
+ 428817 [abinoam@gm i] Perhaps it's a time slicing issue.
| 428818 [nikita.troph] In both cases I see the same result as in my first example with
+ 428819 [shortcutter@] I am suspecting threading. Code in Curses suggests that there are
[ANN] sportkit - sport.db.starter Update - Build Your Own HTTP JSON API
428813 [gerald.bauer] What's the sport.db.starter kit?
[ANN] rubygems-cleanroom 1.0.1 Released
428815 [ryand-ruby@z] rubygems-cleanroom version 1.0.1 has been released!
[ANN] worldlite gem v0.1 - lightweight public domain country data (all data incl. as good ol' ruby code - no db, no deps
428820 [gerald.bauer] I've put together a new world data gem, that is, worldlite, that
428821 [ammarabuali@] Very cool. Thanks for taking the time to compile this into a gem.
428822 [gerald.bauer] Thanks for your kind words. The country calling codes are NOT yet
win32ole VT_ERROR question
428825 [dsisnero@gm ] I am trying to code an error code for an optional parameter list.
428880 [masaki.suket] Sorry for being too late to reply.
428895 [dsisnero@gm ] Wow, just saw this. I will rebuild my ruby to see if this cures my
VS12 NMAKE : fatal error U1077: 'cl': return code '0x2'
428829 [Julesss2@ho ] When i run .\win32\configure.bat from powershell in the source folder,i get the error
428831 [matt.talebi@] ...
Re: VS12 NMAKE : fatal error U1077: 'cl' return code '0x2'
428830 [josh@jo hm .] Looks like cl.exe cannot be found. You should use vcvarsall.bat to =
[ANN] JRuby 1.7.14 Released
428832 [tom.enebo@gm] The JRuby community is pleased to announce the release of JRuby 1.7.14
$stderr debugging library
428833 [kf7qga@gm il] ...
428834 [alexch@gm il] ...
428838 [kf7qga@gm il] ...
428842 [andrew@av t.] Sounds like a useful gem.
428846 [rahegge@gm i] how about $stddebug?
428855 [kf7qga@gm il] Adam, Andrew, and Alex (the A team!), thank you for your help. I liked
[ANN] gauntlet 2.1.0 Released
428835 [ryand-ruby@z] gauntlet version 2.1.0 has been released!
[ANN] minitest 5.4.1 Released
428836 [ryand-ruby@z] minitest version 5.4.1 has been released!
[ANN] ruby2ruby 2.1.2 Released
428837 [ryand-ruby@z] ruby2ruby version 2.1.2 has been released!
428843 [gvimrc@gm il] Does this mean we can someday have a decent Ruby Lisp/Clojure like
[ANN] minitest-gcstats 1.0.0 Released
428839 [ryand-ruby@z] minitest-gcstats version 1.0.0 has been released!
[ANN] minitest-bisect 1.0.0 Released
428840 [ryand-ruby@z] minitest-bisect version 1.0.0 has been released!
[ANN] oedipus_lex 2.4.0 Released
428841 [ryand-ruby@z] oedipus_lex version 2.4.0 has been released!
Can I benefit io_splice for a simple tcp proxy with ruby?
428844 [eliezer@ng e] I am writing a tiny tcp proxy and I want to peek the connection and then
428845 [ e@80 24 or ] Likely, yes. But it's not a huge win either, due to syscall overhead.
Value Objects implementation in Ruby
428847 [aruprakshit@] I am reading currently one design pattern called the _value object_. To
+ 428848 [bkerley@br c] charset=windows-1252
+ 428849 [shortcutter@] Do not use an assignment method then. :-) As Bryce mentioned one
[ANN] Rroonga 4.0.4
428850 [myokoym@gm i] We released Rroonga 4.0.4 on the last friday.
+ 428851 [quintus@qu n] That looks very nice. I was looking for a search engine for Ruby that
| 428852 [myokoym@gm i] I'm so glad to hear that. We'll continue to improve Rroonga.
+ 428853 [normalperson] Just seeing the project name and not knowing what it is might cause some
428854 [myokoym@gm i] Thanks for your suggestion! I think so, too. I'll use it on the next release.
Q: set output grows huge after ruby installation
428856 [miguelin@us ] ...
428857 [ e@80 24 or ] I didn't look at your env (don't feel like unzipping), but that's how
428858 [gvimrc@gm il] Exactly the reason I booted out RVM when I first started using Ruby. No
428859 [miguelin@us ] Thanks Eric Wong and gvim for you replies,
+ 428860 [fluido@fl id] I am not familiar with CentOS, but is compilation not an option?
+ 428862 [hassan.schro] FWIW, lots of people are very happily using RVM to manage their
+ 428863 [stu@ru yp og] make =)
+ 428864 [andrew@av t.] rbenv and chruby depend on these tools for installing all the different
428867 [ryand-ruby@z] I'm quite happy using ruby-build either as-is or as an rbenv plugin. =
+ 428868 [matthew@ke w] For what it's worth, I install my various rubies side-by-side thanks to
+ 428869 [tom@th ma le] rbenv can be used in a way that doesn't infect your shell environment at =
Up to date Ruby cheat pdf?
428861 [gvimrc@gm il] Is there an up to date Ruby cheat sheet pdf that I can download? All I
428866 [ryand-ruby@z] can see on Google are for old versions of Ruby.
[ANN] JRuby 1.7.15 has been released!
428865 [tom.enebo@gm] The JRuby community is pleased to announce the release of JRuby 1.7.15
Stoooopid OOP question. (Really. You've been warned.)
428870 [ken@jo s. rg] Hey, all. I've never taken a for-real OOP-related course, and I'm 99%
428871 [andrew@av t.] Often that's all you need, if all you want is a lightweight way to
+ 428873 [ryand-ruby@z] internally stores your hash (or array), and then you can add the methods =
| + 428876 [nbarnes@gm i] What Ryan said. Overdesigning and overbuilding are bad design
| | 428879 [andrew@av t.] A "Collection" for lack of a better name to represent what's actually
| + 428877 [matthew@ke w] I thought Java taught us that OOP = Enterprisey, and Enterprisey = CLASSES
| + 428878 [andrew@av t.] For what it's worth, I absolutely agree with you as long as the hash
| 428881 [shortcutter@] Sounds slightly better to me. But even then there is the issue that
+ 428884 [alexch@gm il] y stores your hash (or array)
gem command broken on Cygwin 64 with Ruby 2.0.0p481
428872 [shortcutter@] did someone of you experience this as well?
428874 [ryand-ruby@z] Hrm... do you have a ~/.gemrc?
428875 [shortcutter@] No. I had a directory ~/.gem. But moving that away does not make a difference.
What is the significance of the leading trailing underscores with instance variable names ?
428882 [aruprakshit@] I am reading Rails guide, and I found the below code -
+ 428883 [bkerley@br c] In this case, it's to signal that `@_current_user` is an
+ 428889 [andrew@av t.] ActionController takes all assigned instance variables (in web action
428890 [atma@co va e] charset=utf-8
428891 [jgabrielygal] def primary_key_for(table)
428894 [alex@st nk .] Yeah, but...
428896 [matthew@ke w] Saying it returns nil doesn't necessarily mean it returns nil, butit
Real world method examples for public, protected and private
428885 [phil@pr co .] People,
+ 428886 [bkerley@br c] charset=windows-1252
| 428887 [phil@pr co .] Bryce,
+ 428888 [phil@pr co .] Bill,
web ruby forum email list
428892 [regis.aubare] Since some weeks, it's seem that topics which are post at
428893 [shortcutter@] I think the gateway is one way for quite some time already. I just
[ANN] minitest-bisect 1.1.0 Released
428897 [ryand-ruby@z] minitest-bisect version 1.1.0 has been released!
Help with proper graph creation using chartkick and sinatra
428898 [atma@co va e] charset=us-ascii
singleton methods examples in book 0f ruby
428899 [1093218247@q] I am a new rubier, so i learned ruby from book-of-ruby. I'm confused in
428900 [r.stansfield] #include? needs to be passed a symbol rather than a string, it doesn't
428901 [matthew@ke w] Yes, IIRC one of the changes between Ruby 1.8 and 1.9 was that lots of
428918 [1093218247@q] ...
[ANN] Celluloid(::IO/ZMQ/DCell) 0.16.0: actor-based concurrent objects for Ruby
428902 [bascule@gm i] Celluloid is a concurrent object oriented programming framework for Ruby
428903 [ron.lelay@gm] ...
+ 428904 [alyman@ya oo] ...
+ 428905 [jgabrielygal] if i == 21
428906 [jgabrielygal] Sorry to respond to myself, but as you see below, print with \n at the
428907 [ron.lelay@gm] Thanks a lot. I'm going to work it out and clean this mess up.
428908 [hassan.schro] They can be hard to follow when overused, and there are frequently
+ 428909 [ron.lelay@gm] I shall try this one. I realize to work more on the subject. There are waysI don't think of. !
+ 428914 [ron.lelay@gm] number 21 ;)=A0
428915 [jgabrielygal] So from 0 to 18, the number should be +1, 19 and 20 are special, and
428916 [ron.lelay@gm] Thanks for your answer. I'll try this.
428917 [jgabrielygal] def mark_as(index)