Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPAddr add helper commands get_ip and get_subnet #1636

Closed
wants to merge 3 commits into from

Conversation

@x89
Copy link

commented May 28, 2017

I had to implement the following for some nicer methods in another instance where I'm using the code. It's my first Ruby PR so please let me know if I've messed anything up!

  def get_ip
    self.inspect.split(/[\/:]/).slice(2)
  end

  def get_subnet
    self.inspect.split(/[\/:>]/).slice(3)
  end
@x89

This comment has been minimized.

Copy link
Author

commented May 28, 2017

I'm a bit confused as to why the first CI build is failing, on my own machine it returns success:

$ make -s $JOBS test-rubyspec MSPECOPT=-j
generating x86_64-linux-fake.rb
In file included from /usr/include/bits/libc-header-start.h:33:0,
                 from /usr/include/stdio.h:28,
                 from ../include/ruby/defines.h:101,
                 from ../include/ruby/ruby.h:36,
                 from ../version.c:12:
/usr/include/features.h:373:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
x86_64-linux-fake.rb updated
ruby 2.5.0dev (2017-05-29 ipaddr-get-sub.. 58948) [x86_64-linux]
[- | ==================100%================== | 00:00:00]      0F      0E 

Finished in 20.919751 seconds

3569 files, 26409 examples, 200760 expectations, 0 failures, 0 errors, 0 tagged

If somebody could point me in the right direction I'd be grateful!

@hsbt

This comment has been minimized.

Copy link
Member

commented May 28, 2017

@x89 Can you rebase from our latest master?

@x89

This comment has been minimized.

Copy link
Author

commented May 29, 2017

@hsbt this was from the trunk branch, should I be using the 2.4 branch instead?

@x89

This comment has been minimized.

Copy link
Author

commented May 29, 2017

Okay it seems to have worked now, I created a bug report (feature request) as well https://bugs.ruby-lang.org/issues/13610

@x89 x89 changed the title Ipaddr get subnet ip IPAddr add helper commands get_ip and get_subnet Jun 1, 2017

@hsbt hsbt requested a review from knu Oct 21, 2017

@matzbot matzbot force-pushed the ruby:trunk branch from 2677ddd to ce7ad3a Jan 18, 2018

@hsbt hsbt assigned knu Jan 30, 2018

@k0kubun k0kubun changed the base branch from trunk to master Aug 15, 2019

@k0kubun

This comment has been minimized.

Copy link
Member

commented Aug 17, 2019

It seems to have a conflict now. Could you rebase this from master?

@k0kubun

This comment has been minimized.

Copy link
Member

commented Aug 19, 2019

Let me close this as it has not been updated for a while. Please reopen this after resolving conflicts. Thanks.

@k0kubun k0kubun closed this Aug 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.